Gentoo Archives: gentoo-commits

From: "Michał Górny" <mgorny@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/zope-testing/
Date: Sat, 09 Apr 2022 20:23:31
Message-Id: 1649535802.edc8e716cb50cb3f0f026925677571811211afd0.mgorny@gentoo
1 commit: edc8e716cb50cb3f0f026925677571811211afd0
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Sat Apr 9 20:20:03 2022 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Sat Apr 9 20:23:22 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=edc8e716
7
8 dev-python/zope-testing: Remove namespace pkg dep
9
10 Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
11
12 .../zope-testing/zope-testing-4.10-r1.ebuild | 48 ++++++++++++++++++++++
13 1 file changed, 48 insertions(+)
14
15 diff --git a/dev-python/zope-testing/zope-testing-4.10-r1.ebuild b/dev-python/zope-testing/zope-testing-4.10-r1.ebuild
16 new file mode 100644
17 index 000000000000..0ad39021764d
18 --- /dev/null
19 +++ b/dev-python/zope-testing/zope-testing-4.10-r1.ebuild
20 @@ -0,0 +1,48 @@
21 +# Copyright 1999-2022 Gentoo Authors
22 +# Distributed under the terms of the GNU General Public License v2
23 +
24 +EAPI=8
25 +
26 +DISTUTILS_USE_PEP517=setuptools
27 +PYTHON_COMPAT=( python3_{8..10} pypy3 )
28 +
29 +inherit distutils-r1
30 +
31 +MY_PN=${PN/-/.}
32 +MY_P=${MY_PN}-${PV}
33 +
34 +DESCRIPTION="Zope testing helpers"
35 +HOMEPAGE="
36 + https://pypi.org/project/zope.testing/
37 + https://github.com/zopefoundation/zope.testing/
38 +"
39 +SRC_URI="mirror://pypi/${P::1}/${MY_PN}/${MY_P}.tar.gz"
40 +S="${WORKDIR}/${MY_P}"
41 +
42 +LICENSE="ZPL"
43 +SLOT="0"
44 +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
45 +
46 +distutils_enable_tests unittest
47 +
48 +src_prepare() {
49 + # strip rdep specific to namespaces
50 + sed -i -e "/'setuptools'/d" setup.py || die
51 + distutils-r1_src_prepare
52 +}
53 +
54 +python_compile() {
55 + distutils-r1_python_compile
56 + find "${BUILD_DIR}" -name '*.pth' -delete || die
57 +}
58 +
59 +python_test() {
60 + cd "${BUILD_DIR}/install$(python_get_sitedir)" || die
61 + # this is needed to keep the tests working while
62 + # dev-python/namespace-zope is still installed
63 + cat > zope/__init__.py <<-EOF || die
64 + __path__ = __import__('pkgutil').extend_path(__path__, __name__)
65 + EOF
66 + eunittest
67 + rm zope/__init__.py || die
68 +}