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-schema/
Date: Sat, 09 Apr 2022 20:23:31
Message-Id: 1649535801.5f7acbfd50e9808c1461313e00c40c8b8a35c1bb.mgorny@gentoo
1 commit: 5f7acbfd50e9808c1461313e00c40c8b8a35c1bb
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Sat Apr 9 20:15:35 2022 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Sat Apr 9 20:23:21 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5f7acbfd
7
8 dev-python/zope-schema: PEP517, remove namespace dep
9
10 Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
11
12 dev-python/zope-schema/zope-schema-6.2.0-r1.ebuild | 58 ++++++++++++++++++++++
13 dev-python/zope-schema/zope-schema-6.2.0.ebuild | 43 ----------------
14 2 files changed, 58 insertions(+), 43 deletions(-)
15
16 diff --git a/dev-python/zope-schema/zope-schema-6.2.0-r1.ebuild b/dev-python/zope-schema/zope-schema-6.2.0-r1.ebuild
17 new file mode 100644
18 index 000000000000..cbd811826980
19 --- /dev/null
20 +++ b/dev-python/zope-schema/zope-schema-6.2.0-r1.ebuild
21 @@ -0,0 +1,58 @@
22 +# Copyright 1999-2022 Gentoo Authors
23 +# Distributed under the terms of the GNU General Public License v2
24 +
25 +EAPI=8
26 +
27 +DISTUTILS_USE_PEP517=setuptools
28 +PYTHON_COMPAT=( python3_{8..10} pypy3 )
29 +
30 +inherit distutils-r1
31 +
32 +MY_PN=${PN/-/.}
33 +MY_P=${MY_PN}-${PV}
34 +DESCRIPTION="Zope schema Architecture"
35 +HOMEPAGE="
36 + https://pypi.org/project/zope.schema/
37 + https://github.com/zopefoundation/zope.schema/
38 +"
39 +SRC_URI="mirror://pypi/${PN:0:1}/${MY_PN}/${MY_P}.tar.gz"
40 +S="${WORKDIR}/${MY_P}"
41 +
42 +LICENSE="ZPL"
43 +SLOT="0"
44 +KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86"
45 +
46 +RDEPEND="
47 + dev-python/zope-event[${PYTHON_USEDEP}]
48 + >=dev-python/zope-interface-5.0.0[${PYTHON_USEDEP}]
49 +"
50 +BDEPEND="
51 + test? (
52 + dev-python/zope-i18nmessageid[${PYTHON_USEDEP}]
53 + dev-python/zope-testing[${PYTHON_USEDEP}]
54 + )
55 +"
56 +
57 +distutils_enable_tests unittest
58 +
59 +src_prepare() {
60 + # strip rdep specific to namespaces
61 + sed -i -e "/'setuptools'/d" setup.py || die
62 + distutils-r1_src_prepare
63 +}
64 +
65 +python_compile() {
66 + distutils-r1_python_compile
67 + find "${BUILD_DIR}" -name '*.pth' -delete || die
68 +}
69 +
70 +python_test() {
71 + cd "${BUILD_DIR}/install$(python_get_sitedir)" || die
72 + # this is needed to keep the tests working while
73 + # dev-python/namespace-zope is still installed
74 + cat > zope/__init__.py <<-EOF || die
75 + __path__ = __import__('pkgutil').extend_path(__path__, __name__)
76 + EOF
77 + eunittest
78 + rm zope/__init__.py || die
79 +}
80
81 diff --git a/dev-python/zope-schema/zope-schema-6.2.0.ebuild b/dev-python/zope-schema/zope-schema-6.2.0.ebuild
82 deleted file mode 100644
83 index 4f5e20c9cfe1..000000000000
84 --- a/dev-python/zope-schema/zope-schema-6.2.0.ebuild
85 +++ /dev/null
86 @@ -1,43 +0,0 @@
87 -# Copyright 1999-2021 Gentoo Authors
88 -# Distributed under the terms of the GNU General Public License v2
89 -
90 -EAPI=8
91 -
92 -DISTUTILS_USE_SETUPTOOLS=rdepend
93 -PYTHON_COMPAT=( python3_{8..10} pypy3 )
94 -
95 -inherit distutils-r1
96 -
97 -MY_PN=${PN/-/.}
98 -MY_P=${MY_PN}-${PV}
99 -
100 -DESCRIPTION="Zope schema Architecture"
101 -HOMEPAGE="https://github.com/zopefoundation/zope.schema http://docs.zope.org/zope.schema/"
102 -SRC_URI="mirror://pypi/${PN:0:1}/${MY_PN}/${MY_P}.tar.gz"
103 -S="${WORKDIR}/${MY_P}"
104 -
105 -LICENSE="ZPL"
106 -SLOT="0"
107 -KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86"
108 -
109 -RDEPEND="
110 - dev-python/zope-event[${PYTHON_USEDEP}]
111 - >=dev-python/zope-interface-5.0.0[${PYTHON_USEDEP}]"
112 -BDEPEND="
113 - test? (
114 - dev-python/zope-i18nmessageid[${PYTHON_USEDEP}]
115 - dev-python/zope-testing[${PYTHON_USEDEP}]
116 - )"
117 -
118 -distutils_enable_tests unittest
119 -
120 -python_test() {
121 - eunittest src
122 -}
123 -
124 -python_install_all() {
125 - distutils-r1_python_install_all
126 -
127 - # remove .pth files since dev-python/namespace-zope handles the ns
128 - find "${D}" -name '*.pth' -delete || die
129 -}