1 |
Closes: https://bugs.gentoo.org/891959 |
2 |
Signed-off-by: Michał Górny <mgorny@g.o> |
3 |
--- |
4 |
eclass/distutils-r1.eclass | 8 +++++++- |
5 |
1 file changed, 7 insertions(+), 1 deletion(-) |
6 |
|
7 |
diff --git a/eclass/distutils-r1.eclass b/eclass/distutils-r1.eclass |
8 |
index 8896768d3ce9..65d48a19e73d 100644 |
9 |
--- a/eclass/distutils-r1.eclass |
10 |
+++ b/eclass/distutils-r1.eclass |
11 |
@@ -647,7 +647,13 @@ esetup.py() { |
12 |
|
13 |
local setup_py=( setup.py ) |
14 |
if [[ ! -f setup.py ]]; then |
15 |
- if [[ ! -f setup.cfg ]]; then |
16 |
+ # The following call can succeed even if the package does not |
17 |
+ # feature any setuptools configuration. In non-PEP517 mode this |
18 |
+ # could lead to installing an "empty" package. In PEP517 mode, |
19 |
+ # we verify the build system when invoking the backend, |
20 |
+ # rendering this check redundant (and broken for projects using |
21 |
+ # pyproject.toml configuration). |
22 |
+ if [[ ! ${DISTUTILS_USE_PEP517} && ! -f setup.cfg ]]; then |
23 |
die "${FUNCNAME}: setup.py nor setup.cfg not found" |
24 |
fi |
25 |
setup_py=( -c "from setuptools import setup; setup()" ) |
26 |
-- |
27 |
2.39.1 |