summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2023-02-17 07:15:00 +0000
committerSam James <sam@gentoo.org>2023-02-17 07:15:00 +0000
commit3bae8de27d1c8f4596ea838bec571db33cec1653 (patch)
treed2fd089756c3b0eafd89d88e1f369404fc57e4fa /sys-libs/pam_wrapper
parentnet-libs/stem: add note re py3.11 (diff)
downloadgentoo-3bae8de27d1c8f4596ea838bec571db33cec1653.tar.gz
gentoo-3bae8de27d1c8f4596ea838bec571db33cec1653.tar.bz2
gentoo-3bae8de27d1c8f4596ea838bec571db33cec1653.zip
sys-libs/pam_wrapper: enable py3.11
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'sys-libs/pam_wrapper')
-rw-r--r--sys-libs/pam_wrapper/files/pam_wrapper-1.1.4-tests-import.patch22
-rw-r--r--sys-libs/pam_wrapper/pam_wrapper-1.1.4-r2.ebuild (renamed from sys-libs/pam_wrapper/pam_wrapper-1.1.4-r1.ebuild)24
2 files changed, 43 insertions, 3 deletions
diff --git a/sys-libs/pam_wrapper/files/pam_wrapper-1.1.4-tests-import.patch b/sys-libs/pam_wrapper/files/pam_wrapper-1.1.4-tests-import.patch
new file mode 100644
index 000000000000..aba9c370a22c
--- /dev/null
+++ b/sys-libs/pam_wrapper/files/pam_wrapper-1.1.4-tests-import.patch
@@ -0,0 +1,22 @@
+--- a/tests/pypamtest_test.py
++++ b/tests/pypamtest_test.py
+@@ -15,19 +15,6 @@ class PyPamTestCase(unittest.TestCase):
+ self.assertSequenceEqual(test_result.errors, info_list)
+
+ class PyPamTestImport(unittest.TestCase):
+- def setUp(self):
+- " Make sure we load the in-tree module "
+- if sys.hexversion >= 0x3000000:
+- self.modpath = os.path.join(os.getcwd(), "../src/python/python3")
+- else:
+- self.modpath = os.path.join(os.getcwd(), "../src/python/python2")
+- self.system_path = sys.path[:]
+- sys.path = [ self.modpath ]
+-
+- def tearDown(self):
+- " Restore the system path "
+- sys.path = self.system_path
+-
+ def testImport(self):
+ " Import the module "
+ try:
diff --git a/sys-libs/pam_wrapper/pam_wrapper-1.1.4-r1.ebuild b/sys-libs/pam_wrapper/pam_wrapper-1.1.4-r2.ebuild
index 264a74d7a5c3..20e06b42b366 100644
--- a/sys-libs/pam_wrapper/pam_wrapper-1.1.4-r1.ebuild
+++ b/sys-libs/pam_wrapper/pam_wrapper-1.1.4-r2.ebuild
@@ -1,10 +1,9 @@
# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=7
-
-PYTHON_COMPAT=( python3_{9..10} )
+EAPI=8
+PYTHON_COMPAT=( python3_{9..11} )
inherit cmake-multilib python-r1
DESCRIPTION="A tool to test PAM applications and PAM modules"
@@ -31,6 +30,10 @@ DEPEND="
test? ( dev-util/cmocka[${MULTILIB_USEDEP}] )
"
+PATCHES=(
+ "${FILESDIR}"/${PN}-1.1.4-tests-import.patch
+)
+
multilib_src_configure() {
configure_for_python() {
local mycmakeargs=( -DUNIT_TESTING=OFF )
@@ -60,6 +63,21 @@ multilib_src_compile() {
cmake_src_compile
}
+multilib_src_test() {
+ cmake_src_test
+
+ # Fails b/c of sandbox?
+ #python_test() {
+ # local -x PYTHONPATH="${BUILD_DIR}/src/python/python3:${PYTHONPATH}"
+ # elog "${PYTHONPATH}"
+ # ${EPYTHON} "${S}"/tests/pypamtest_test.py || die "Tests failed with ${EPYTHON}"
+ #}
+
+ #if multilib_is_native_abi ; then
+ # python_foreach_impl python_test
+ #fi
+}
+
multilib_src_install() {
if multilib_is_native_abi ; then
python_foreach_impl cmake_src_install