Gentoo Archives: gentoo-dev

From: "Michał Górny" <mgorny@g.o>
To: gentoo-dev@l.g.o
Cc: "Michał Górny" <mgorny@g.o>
Subject: [gentoo-dev] [PATCH 06/18] distutils-r1.eclass: Make *-nspkg.pth warning fatal for EAPI 9+
Date: Sat, 04 Jun 2022 09:05:53
Message-Id: 20220604090334.4003-7-mgorny@gentoo.org
In Reply to: [gentoo-dev] [PATCH 00/18] distutils-r1.eclass D_U_PEP517=no mode & other patches by "Michał Górny"
1 Now that we've essentially removed non-implicit namespace packages
2 from Gentoo and setuptools upstream has deprecated their old solution,
3 it's time to make this check fatal. Unfortunately, I did not think
4 of it when adding PEP517 mode, so let's do that in EAPI 9.
5
6 Signed-off-by: Michał Górny <mgorny@g.o>
7 ---
8 eclass/distutils-r1.eclass | 4 ++++
9 1 file changed, 4 insertions(+)
10
11 diff --git a/eclass/distutils-r1.eclass b/eclass/distutils-r1.eclass
12 index b0318410b100..1d7bea6d8cab 100644
13 --- a/eclass/distutils-r1.eclass
14 +++ b/eclass/distutils-r1.eclass
15 @@ -1865,6 +1865,10 @@ _distutils-r1_check_namespace_pth() {
16 ewarn "the ebuild accordingly:"
17 ewarn
18 ewarn " https://projects.gentoo.org/python/guide/concept.html#namespace-packages"
19 +
20 + if ! has "${EAPI}" 6 7 8; then
21 + die "*-nspkg.pth files are banned in EAPI ${EAPI}"
22 + fi
23 fi
24 }
25
26 --
27 2.35.1