dev-python/zope-testing: Bump to 5.0.1

Signed-off-by: Michał Górny <mgorny@gentoo.org>
This commit is contained in:
Michał Górny
2022-12-21 08:38:22 +01:00
parent e08b73fd12
commit 5f3b7e8400
2 changed files with 57 additions and 0 deletions

View File

@@ -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

View File

@@ -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
}