From 60ef204725e4c667efd95a2b8742180345f347ca Mon Sep 17 00:00:00 2001 From: Michał Górny Date: Sun, 30 Jan 2022 12:12:02 +0100 Subject: distutils-r1.eclass: make esetup.py require setup.{py,cfg} MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- eclass/distutils-r1.eclass | 3 +++ 1 file changed, 3 insertions(+) (limited to 'eclass/distutils-r1.eclass') 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 -- cgit v1.2.3-65-gdbad