Hi, This series includes some long overdue fixes + some recent PEP517 fixes. In order:
1. Disabling post-test egg-info cleaning code in PEP517 -- this was needed when distutils_install_for_testing was used, and we no longer use it in PEP517 mode. 2. Fix a regression that `esetup.py` would successfully do nothing when run in a directory where there's no setuptools config. Now it requires the current directory to contain either `setup.py` or `setup.cfg`. 3. Make distutils sub-phases pass the return value through. This primarily fixes a somewhat rare bug involving: src_test() { virtx distutils-r1_src_test } python_test() { epytest } This code would not die on failure because virtx runs its arguments nonfatal, and epytest respects nonfatal. Ideally, you'd use explicit `|| die` in python_test() but if you don't, the unsuccessful return code from epytest will eventually reach virtx and cause it to fail. 4. Refactoring. 5. Add DISTUTILS_DEPS containing BDEPEND in PEP517 mode. This is needed to populate BDEPEND in DISTUTILS_OPTIONAL ebuilds. For non-PEP517 mode, we assumed that the dev will just inline the setuptools dep but with PEP517 we have more deps, and the tools used by eclass (tomli, installer) are not guaranteed to be fixed forever. 6. Add a QA warning when you declare DISTUTILS_USE_SETUPTOOLS along with DISTUTILS_OPTIONAL (it doesn't work). This warning was originally part of the mismatched DUS check and was removed along with it. However, this one still makes sense, so let's do it in the eclass. Michał Górny (6): distutils-r1.eclass: Disable stale egg-info cleaning in PEP517 mode distutils-r1.eclass: make esetup.py require setup.{py,cfg} distutils-r1.eclass: Fix subphase return value passthrough distutils-r1.eclass: Move DISTUTILS_OPTIONAL check into set_globals distutils-r1.eclass: Add DISTUTILS_DEPS output var for PEP 517 mode distutils-r1.eclass: Restore QA warning for DUS + DISTUTILS_OPTIONAL eclass/distutils-r1.eclass | 114 +++++++++++++++++++++++++++++-------- 1 file changed, 90 insertions(+), 24 deletions(-) -- 2.35.1