summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2022-12-21 08:38:22 +0100
committerMichał Górny <mgorny@gentoo.org>2022-12-21 08:51:09 +0100
commit5f3b7e840021f03de87cbee3d926dd465d66f08e (patch)
tree2f43080d1bb32a4965c857aa26695d5a3412ba95 /dev-python/zope-testing
parentdev-python/psycopg: Bump to 3.1.7 (diff)
downloadgentoo-5f3b7e840021f03de87cbee3d926dd465d66f08e.tar.gz
gentoo-5f3b7e840021f03de87cbee3d926dd465d66f08e.tar.bz2
gentoo-5f3b7e840021f03de87cbee3d926dd465d66f08e.zip
dev-python/zope-testing: Bump to 5.0.1
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'dev-python/zope-testing')
-rw-r--r--dev-python/zope-testing/Manifest1
-rw-r--r--dev-python/zope-testing/zope-testing-5.0.1.ebuild56
2 files changed, 57 insertions, 0 deletions
diff --git a/dev-python/zope-testing/Manifest b/dev-python/zope-testing/Manifest
index 11375d98ff56..ee018e168481 100644
--- a/dev-python/zope-testing/Manifest
+++ b/dev-python/zope-testing/Manifest
@@ -1 +1,2 @@
DIST zope.testing-4.10.tar.gz 45359 BLAKE2B 477d28a7d1a76c0a5111f16859d9e3b9b9ac9cc953b0e2c7dd9ba0a39b498d71442d1b5aaf485455c919ad618efb1f9f9b8e1587fd4905c4a823b04ef09ef8b2 SHA512 35fd5114b6de3cb47336185feb8bf8f444b53ef2c32f165e57756a017ec9caba9a29f2ec01844ebcf156fff1c2b7424b3ac126b3e8d4daefe73e1a640d21589a
+DIST zope.testing-5.0.1.tar.gz 41745 BLAKE2B c3ab3ba7a15a050a29e41c26df3426dc3dd48d98b60e55015680c6aa86fccbbf44718d17643189a1978c51605eb774c108e0056a1e21023b99ca633a2abd7788 SHA512 357d1c0eb761dba4e0e964a51dbc4368c00c9133a011467a2bb3629a2c5c28ccb3886caad215288b99cda1de25fd7ead674068f275649d94a32dc42d19d78caf
diff --git a/dev-python/zope-testing/zope-testing-5.0.1.ebuild b/dev-python/zope-testing/zope-testing-5.0.1.ebuild
new file mode 100644
index 000000000000..64fc54f09ed6
--- /dev/null
+++ b/dev-python/zope-testing/zope-testing-5.0.1.ebuild
@@ -0,0 +1,56 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DISTUTILS_USE_PEP517=setuptools
+PYTHON_COMPAT=( python3_{8..11} pypy3 )
+
+inherit distutils-r1
+
+MY_PN=${PN/-/.}
+MY_P=${MY_PN}-${PV}
+
+DESCRIPTION="Zope testing helpers"
+HOMEPAGE="
+ https://pypi.org/project/zope.testing/
+ https://github.com/zopefoundation/zope.testing/
+"
+SRC_URI="mirror://pypi/${P::1}/${MY_PN}/${MY_P}.tar.gz"
+S="${WORKDIR}/${MY_P}"
+
+LICENSE="ZPL"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+
+RDEPEND="
+ !dev-python/namespace-zope
+"
+
+distutils_enable_tests unittest
+
+src_prepare() {
+ # strip rdep specific to namespaces
+ sed -i -e "/'setuptools'/d" setup.py || die
+ distutils-r1_src_prepare
+}
+
+python_compile() {
+ distutils-r1_python_compile
+ find "${BUILD_DIR}" -name '*.pth' -delete || die
+}
+
+python_test() {
+ cd "${BUILD_DIR}/install$(python_get_sitedir)" || die
+ distutils_write_namespace zope
+ "${EPYTHON}" - <<-EOF || die
+ import sys
+ import unittest
+
+ from zope.testing.tests import test_suite
+
+ runner = unittest.TextTestRunner(verbosity=2)
+ result = runner.run(test_suite())
+ sys.exit(0 if result.wasSuccessful() else 1)
+ EOF
+}