commit:     0fc950fe84f88ef9d72d705f067f534546423225
Author:     Patrick McLean <chutzpah <AT> gentoo <DOT> org>
AuthorDate: Mon May 24 21:03:12 2021 +0000
Commit:     Patrick McLean <chutzpah <AT> gentoo <DOT> org>
CommitDate: Mon May 24 21:03:40 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0fc950fe

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 <AT> gentoo.org>

 .../files/nss-pam-ldapd-0.9.11-tests-py39.patch    | 26 ++++++++++++++++++++++
 .../nss-pam-ldapd/nss-pam-ldapd-0.9.11-r3.ebuild   |  6 +++--
 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 00000000000..6761de73d6c
--- /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 3d6590078bc..3f748952208 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() {

Reply via email to