diff options
author | 2022-01-30 12:12:02 +0100 | |
---|---|---|
committer | 2022-02-01 19:33:17 +0100 | |
commit | 60ef204725e4c667efd95a2b8742180345f347ca (patch) | |
tree | a55332563cdaf1538a5cdef25ceceaf7c11e6101 /eclass/distutils-r1.eclass | |
parent | distutils-r1.eclass: Disable stale egg-info cleaning in PEP517 mode (diff) | |
download | gentoo-60ef204725e4c667efd95a2b8742180345f347ca.tar.gz gentoo-60ef204725e4c667efd95a2b8742180345f347ca.tar.bz2 gentoo-60ef204725e4c667efd95a2b8742180345f347ca.zip |
distutils-r1.eclass: make esetup.py require setup.{py,cfg}
Make esetup.py fail if neither setup.py nor setup.cfg is available.
To support PEP 517 builds, the function has been modified to work
without setup.py. However, this also caused esetup.py to implicitly
succeed in installing zero files on non-distutils/setuptools packages.
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'eclass/distutils-r1.eclass')
-rw-r--r-- | eclass/distutils-r1.eclass | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/eclass/distutils-r1.eclass b/eclass/distutils-r1.eclass index 4ec252958408..a81d95f4eb6e 100644 --- a/eclass/distutils-r1.eclass +++ b/eclass/distutils-r1.eclass @@ -544,6 +544,9 @@ esetup.py() { if [[ ${DISTUTILS_USE_SETUPTOOLS} == pyproject.toml ]]; then setup_py=( -m pyproject2setuppy ) elif [[ ! -f setup.py ]]; then + if [[ ! -f setup.cfg ]]; then + die "${FUNCNAME}: setup.py nor setup.cfg not found" + fi setup_py=( -c "from setuptools import setup; setup()" ) fi |