summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick McLean <chutzpah@gentoo.org>2021-05-24 14:03:12 -0700
committerPatrick McLean <chutzpah@gentoo.org>2021-05-24 14:03:40 -0700
commit0fc950fe84f88ef9d72d705f067f534546423225 (patch)
tree17d900eb0bf0fe68cfbb5cd8cbd872f02621a777 /sys-auth
parentdev-libs/libical: Stabilize 3.0.10 sparc, #791439 (diff)
downloadgentoo-0fc950fe84f88ef9d72d705f067f534546423225.tar.gz
gentoo-0fc950fe84f88ef9d72d705f067f534546423225.tar.bz2
gentoo-0fc950fe84f88ef9d72d705f067f534546423225.zip
sys-auth/nss-pam-ldapd-0.9.11-r3: Add py39
Package-Manager: Portage-3.0.18, Repoman-3.0.3 Signed-off-by: Patrick McLean <chutzpah@gentoo.org>
Diffstat (limited to 'sys-auth')
-rw-r--r--sys-auth/nss-pam-ldapd/files/nss-pam-ldapd-0.9.11-tests-py39.patch26
-rw-r--r--sys-auth/nss-pam-ldapd/nss-pam-ldapd-0.9.11-r3.ebuild6
2 files changed, 30 insertions, 2 deletions
diff --git a/sys-auth/nss-pam-ldapd/files/nss-pam-ldapd-0.9.11-tests-py39.patch b/sys-auth/nss-pam-ldapd/files/nss-pam-ldapd-0.9.11-tests-py39.patch
new file mode 100644
index 000000000000..6761de73d6ce
--- /dev/null
+++ b/sys-auth/nss-pam-ldapd/files/nss-pam-ldapd-0.9.11-tests-py39.patch
@@ -0,0 +1,26 @@
+diff --git a/tests/test_doctest.sh b/tests/test_doctest.sh
+index 5b3a13d..82749a2 100755
+--- a/tests/test_doctest.sh
++++ b/tests/test_doctest.sh
+@@ -53,7 +53,7 @@ do
+ if ${python} -c 'import ldap'
+ then
+ echo "Running pynslcd doctests with $python..."
+- PYTHONPATH="${top_builddir}/pynslcd" ${python} -m doctest -v "${top_srcdir}/pynslcd"/*.py
++ PYTHONPATH="${top_builddir}/pynslcd:${top_builddir}" ${python} -m doctest -v "${top_srcdir}/pynslcd"/*.py
+ fi
+ echo "Running pynslcd doctests with $python..."
+ PYTHONPATH="${top_builddir}/utils" ${python} -m doctest -v "${top_srcdir}/utils"/*.py
+diff --git a/tests/test_pynslcd_cache.py b/tests/test_pynslcd_cache.py
+index 8d3d02a..e7b19c0 100755
+--- a/tests/test_pynslcd_cache.py
++++ b/tests/test_pynslcd_cache.py
+@@ -27,6 +27,8 @@ import unittest
+ # fix the Python path
+ sys.path.insert(1, os.path.abspath(os.path.join(sys.path[0], '..', 'pynslcd')))
+ sys.path.insert(2, os.path.abspath(os.path.join('..', 'pynslcd')))
++sys.path.insert(3, os.path.abspath(os.path.join('..')))
++print(sys.path)
+
+
+ # TODO: think about case-sensitivity of cache searches (have tests for that)
diff --git a/sys-auth/nss-pam-ldapd/nss-pam-ldapd-0.9.11-r3.ebuild b/sys-auth/nss-pam-ldapd/nss-pam-ldapd-0.9.11-r3.ebuild
index 3d6590078bca..3f748952208f 100644
--- a/sys-auth/nss-pam-ldapd/nss-pam-ldapd-0.9.11-r3.ebuild
+++ b/sys-auth/nss-pam-ldapd/nss-pam-ldapd-0.9.11-r3.ebuild
@@ -3,7 +3,7 @@
EAPI=7
-PYTHON_COMPAT=(python3_{7..8})
+PYTHON_COMPAT=(python3_{7..9})
inherit prefix python-r1 autotools multilib multilib-minimal systemd s6 tmpfiles
DESCRIPTION="NSS module for name lookups using LDAP"
@@ -53,6 +53,7 @@ PATCHES=(
"${FILESDIR}/nss-pam-ldapd-0.9.11-use-mkstemp.patch"
"${FILESDIR}/nss-pam-ldapd-0.9.11-relative-imports.patch"
"${FILESDIR}/nss-pam-ldapd-0.9.11-tests.patch"
+ "${FILESDIR}/nss-pam-ldapd-0.9.11-tests-py39.patch"
)
src_prepare() {
@@ -100,7 +101,8 @@ multilib_src_test() {
}
python_test() {
- emake check
+ cp -l "${S}"/pynslcd/*.py pynslcd/ || die "Could not copy python files for tests"
+ nonfatal emake check || die "tests failed with ${EPYTHON}"
}
multilib_src_install_all() {