diff options
author | Michał Górny <mgorny@gentoo.org> | 2022-04-09 17:46:59 +0200 |
---|---|---|
committer | Michał Górny <mgorny@gentoo.org> | 2022-04-11 21:58:36 +0200 |
commit | 50cf28d11e3908467f6c10030ce66f55eea1c23a (patch) | |
tree | f4c17f335ecd77aa64fd131da2c86deb24f16736 /eclass | |
parent | dev-python/twisted: Stabilize 22.4.0 arm64, #837845 (diff) | |
download | gentoo-50cf28d11e3908467f6c10030ce66f55eea1c23a.tar.gz gentoo-50cf28d11e3908467f6c10030ce66f55eea1c23a.tar.bz2 gentoo-50cf28d11e3908467f6c10030ce66f55eea1c23a.zip |
distutils-r1.eclass: Prefer "rm -rf build" over "setup.py clean -a"
Prefer using "rm -rf build" directly over "setup.py clean -a". This
has three advantages:
1. It is much faster.
2. It works on packages that have broken "setup.py clean",
e.g. dev-python/pydantic.
3. It works on packages that block "setup.py clean" and tell you to use
"git clean" (sic!), e.g. dev-python/scipy.
This is a potentially (but unlikely) breaking change, so do it
conditionally to GPEP517_TESTING.
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'eclass')
-rw-r--r-- | eclass/distutils-r1.eclass | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/eclass/distutils-r1.eclass b/eclass/distutils-r1.eclass index de891215e688..e6b0ab5e0e32 100644 --- a/eclass/distutils-r1.eclass +++ b/eclass/distutils-r1.eclass @@ -1090,7 +1090,11 @@ distutils_pep517_install() { # clean the build tree; otherwise we may end up with PyPy3 # extensions duplicated into CPython dists if [[ ${DISTUTILS_USE_PEP517:-setuptools} == setuptools ]]; then - esetup.py clean -a + if [[ ${GPEP517_TESTING} ]]; then + rm -rf build || die + else + esetup.py clean -a + fi fi } |