Gentoo Archives: gentoo-dev

From: "Michał Górny" <mgorny@g.o>
To: gentoo-dev@l.g.o
Cc: "Michał Górny" <mgorny@g.o>
Subject: [gentoo-dev] [PATCH 2/2] distutils-r1.eclass: Issue a QA warning if "build" exists
Date: Sat, 09 Apr 2022 16:38:22
Message-Id: 20220409163751.89200-2-mgorny@gentoo.org
In Reply to: [gentoo-dev] [PATCH 1/2] distutils-r1.eclass: Prefer "rm -rf build" over "setup.py clean -a" by "Michał Górny"
1 Signed-off-by: Michał Górny <mgorny@g.o>
2 ---
3 eclass/distutils-r1.eclass | 8 +++++++-
4 1 file changed, 7 insertions(+), 1 deletion(-)
5
6 diff --git a/eclass/distutils-r1.eclass b/eclass/distutils-r1.eclass
7 index e6b0ab5e0e32..2e4a11bb8826 100644
8 --- a/eclass/distutils-r1.eclass
9 +++ b/eclass/distutils-r1.eclass
10 @@ -1115,7 +1115,13 @@ distutils-r1_python_compile() {
11 # call setup.py build when using setuptools (either via PEP517
12 # or in legacy mode)
13 if [[ ${DISTUTILS_USE_PEP517:-setuptools} == setuptools ]]; then
14 - if [[ ! ${DISTUTILS_USE_PEP517} ]]; then
15 + if [[ ${GPEP517_TESTING} ]]; then
16 + if [[ -d build ]]; then
17 + eqawarn "A 'build' directory exists already. Artifacts from this directory may"
18 + eqawarn "be picked up by setuptools when building for another interpreter."
19 + eqawarn "Please remove this directory prior to building."
20 + fi
21 + else
22 _distutils-r1_copy_egg_info
23 fi
24
25 --
26 2.35.1