diff options
author | Michał Górny <mgorny@gentoo.org> | 2023-01-31 12:29:12 +0100 |
---|---|---|
committer | Michał Górny <mgorny@gentoo.org> | 2023-02-07 15:24:54 +0100 |
commit | 40c3f5de5bc7bb569da1a65da80bb30556fbfc9e (patch) | |
tree | bca06a6d7ff980b498491c2ce5237cb595ca6be5 /eclass/distutils-r1.eclass | |
parent | distutils-r1.eclass: Strip licenses directory (hatchling) (diff) | |
download | gentoo-40c3f5de5bc7bb569da1a65da80bb30556fbfc9e.tar.gz gentoo-40c3f5de5bc7bb569da1a65da80bb30556fbfc9e.tar.bz2 gentoo-40c3f5de5bc7bb569da1a65da80bb30556fbfc9e.zip |
distutils-r1.eclass: esetup.py, omit setup.cfg check in PEP517 mode
Closes: https://bugs.gentoo.org/891959
Closes: https://github.com/gentoo/gentoo/pull/29354
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'eclass/distutils-r1.eclass')
-rw-r--r-- | eclass/distutils-r1.eclass | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/eclass/distutils-r1.eclass b/eclass/distutils-r1.eclass index 30398f9871cd..34f54da85ac3 100644 --- a/eclass/distutils-r1.eclass +++ b/eclass/distutils-r1.eclass @@ -647,7 +647,13 @@ esetup.py() { local setup_py=( setup.py ) if [[ ! -f setup.py ]]; then - if [[ ! -f setup.cfg ]]; then + # The following call can succeed even if the package does not + # feature any setuptools configuration. In non-PEP517 mode this + # could lead to installing an "empty" package. In PEP517 mode, + # we verify the build system when invoking the backend, + # rendering this check redundant (and broken for projects using + # pyproject.toml configuration). + if [[ ! ${DISTUTILS_USE_PEP517} && ! -f setup.cfg ]]; then die "${FUNCNAME}: setup.py nor setup.cfg not found" fi setup_py=( -c "from setuptools import setup; setup()" ) |