1 |
commit: fc2fbe02b9c9bdc5a93da9eb9d4b19cbe1c91eb9 |
2 |
Author: Michał Górny <mgorny <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Apr 8 21:57:39 2022 +0000 |
4 |
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Apr 9 05:56:57 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fc2fbe02 |
7 |
|
8 |
dev-python/zope-configuration: Switch to PEP517 build |
9 |
|
10 |
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org> |
11 |
|
12 |
...4.1.ebuild => zope-configuration-4.4.1-r1.ebuild} | 20 ++++++++++++-------- |
13 |
1 file changed, 12 insertions(+), 8 deletions(-) |
14 |
|
15 |
diff --git a/dev-python/zope-configuration/zope-configuration-4.4.1.ebuild b/dev-python/zope-configuration/zope-configuration-4.4.1-r1.ebuild |
16 |
similarity index 69% |
17 |
rename from dev-python/zope-configuration/zope-configuration-4.4.1.ebuild |
18 |
rename to dev-python/zope-configuration/zope-configuration-4.4.1-r1.ebuild |
19 |
index 902e0b96ab9c..86e3f61d43ef 100644 |
20 |
--- a/dev-python/zope-configuration/zope-configuration-4.4.1.ebuild |
21 |
+++ b/dev-python/zope-configuration/zope-configuration-4.4.1-r1.ebuild |
22 |
@@ -3,6 +3,7 @@ |
23 |
|
24 |
EAPI=8 |
25 |
|
26 |
+DISTUTILS_USE_PEP517=setuptools |
27 |
PYTHON_COMPAT=( python3_{8..10} ) |
28 |
|
29 |
inherit distutils-r1 |
30 |
@@ -35,15 +36,18 @@ BDEPEND=" |
31 |
) |
32 |
" |
33 |
|
34 |
-distutils_enable_tests unittest |
35 |
+distutils_enable_tests pytest |
36 |
|
37 |
-python_test() { |
38 |
- eunittest src |
39 |
+python_compile() { |
40 |
+ distutils-r1_python_compile |
41 |
+ find "${BUILD_DIR}" -name '*.pth' -delete || die |
42 |
} |
43 |
|
44 |
-python_install_all() { |
45 |
- distutils-r1_python_install_all |
46 |
- |
47 |
- # remove .pth files since dev-python/namespace-zope handles the ns |
48 |
- find "${D}" -name '*.pth' -delete || die |
49 |
+python_test() { |
50 |
+ cd "${BUILD_DIR}/install$(python_get_sitedir)/zope" || die |
51 |
+ cat > __init__.py <<-EOF || die |
52 |
+ __import__('pkg_resources').declare_namespace(__name__) |
53 |
+ EOF |
54 |
+ eunittest -s configuration/tests |
55 |
+ rm __init__.py || die |
56 |
} |