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-i18nmessageid/
Date: Sat, 09 Apr 2022 20:23:30
Message-Id: 1649535798.f44a862c4204f8da99672dcc565a5d4183ee5c45.mgorny@gentoo
1 commit: f44a862c4204f8da99672dcc565a5d4183ee5c45
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Sat Apr 9 20:11:16 2022 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Sat Apr 9 20:23:18 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f44a862c
7
8 dev-python/zope-i18nmessageid: EAPI 8, PEP517, remove namespace dep
9
10 Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
11
12 .../zope-i18nmessageid-5.0.1-r1.ebuild | 51 ++++++++++++++++++++++
13 1 file changed, 51 insertions(+)
14
15 diff --git a/dev-python/zope-i18nmessageid/zope-i18nmessageid-5.0.1-r1.ebuild b/dev-python/zope-i18nmessageid/zope-i18nmessageid-5.0.1-r1.ebuild
16 new file mode 100644
17 index 000000000000..834931f505be
18 --- /dev/null
19 +++ b/dev-python/zope-i18nmessageid/zope-i18nmessageid-5.0.1-r1.ebuild
20 @@ -0,0 +1,51 @@
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 +DESCRIPTION="Zope support for i18nmessageid (tagging source of i18n strings)"
34 +HOMEPAGE="
35 + https://pypi.org/project/zope.i18nmessageid/
36 + https://github.com/zopefoundation/zope.i18nmessageid/
37 +"
38 +SRC_URI="mirror://pypi/${MY_PN:0:1}/${MY_PN}/${MY_P}.tar.gz"
39 +S="${WORKDIR}/${MY_P}"
40 +
41 +LICENSE="ZPL"
42 +SLOT="0"
43 +KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86"
44 +
45 +RDEPEND="
46 + dev-python/six[${PYTHON_USEDEP}]
47 +"
48 +
49 +distutils_enable_tests unittest
50 +
51 +src_prepare() {
52 + # strip rdep specific to namespaces
53 + sed -i -e "s:'setuptools',::" setup.py || die
54 + distutils-r1_src_prepare
55 +}
56 +
57 +python_compile() {
58 + distutils-r1_python_compile
59 + find "${BUILD_DIR}" -name '*.pth' -delete || die
60 +}
61 +
62 +python_test() {
63 + cd "${BUILD_DIR}/install$(python_get_sitedir)" || die
64 + # this is needed to keep the tests working while
65 + # dev-python/namespace-zope is still installed
66 + cat > zope/__init__.py <<-EOF || die
67 + __path__ = __import__('pkgutil').extend_path(__path__, __name__)
68 + EOF
69 + eunittest
70 + rm zope/__init__.py || die
71 +}