1 |
commit: 73842715ee7c1f5b193f2a2d78c1fc3caa69b0dd |
2 |
Author: Michał Górny <mgorny <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue May 31 08:47:30 2022 +0000 |
4 |
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Jun 7 06:53:47 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=73842715 |
7 |
|
8 |
distutils-r1.eclass: Make *-nspkg.pth warning fatal for EAPI 9+ |
9 |
|
10 |
Now that we've essentially removed non-implicit namespace packages |
11 |
from Gentoo and setuptools upstream has deprecated their old solution, |
12 |
it's time to make this check fatal. Unfortunately, I did not think |
13 |
of it when adding PEP517 mode, so let's do that in EAPI 9. |
14 |
|
15 |
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org> |
16 |
|
17 |
eclass/distutils-r1.eclass | 4 ++++ |
18 |
1 file changed, 4 insertions(+) |
19 |
|
20 |
diff --git a/eclass/distutils-r1.eclass b/eclass/distutils-r1.eclass |
21 |
index b0318410b100..1d7bea6d8cab 100644 |
22 |
--- a/eclass/distutils-r1.eclass |
23 |
+++ b/eclass/distutils-r1.eclass |
24 |
@@ -1865,6 +1865,10 @@ _distutils-r1_check_namespace_pth() { |
25 |
ewarn "the ebuild accordingly:" |
26 |
ewarn |
27 |
ewarn " https://projects.gentoo.org/python/guide/concept.html#namespace-packages" |
28 |
+ |
29 |
+ if ! has "${EAPI}" 6 7 8; then |
30 |
+ die "*-nspkg.pth files are banned in EAPI ${EAPI}" |
31 |
+ fi |
32 |
fi |
33 |
} |