commit:     6451cf647f04b31a56ea2dc8c3f84a70c2468f87
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Sat Apr  9 15:55:46 2022 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Mon Apr 11 19:58:37 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6451cf64

distutils-r1.eclass: Issue a QA warning if "build" exists

Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 eclass/distutils-r1.eclass | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/eclass/distutils-r1.eclass b/eclass/distutils-r1.eclass
index e6b0ab5e0e32..2e4a11bb8826 100644
--- a/eclass/distutils-r1.eclass
+++ b/eclass/distutils-r1.eclass
@@ -1115,7 +1115,13 @@ distutils-r1_python_compile() {
        # call setup.py build when using setuptools (either via PEP517
        # or in legacy mode)
        if [[ ${DISTUTILS_USE_PEP517:-setuptools} == setuptools ]]; then
-               if [[ ! ${DISTUTILS_USE_PEP517} ]]; then
+               if [[ ${GPEP517_TESTING} ]]; then
+                       if [[ -d build ]]; then
+                               eqawarn "A 'build' directory exists already.  
Artifacts from this directory may"
+                               eqawarn "be picked up by setuptools when 
building for another interpreter."
+                               eqawarn "Please remove this directory prior to 
building."
+                       fi
+               else
                        _distutils-r1_copy_egg_info
                fi
 

Reply via email to