summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2022-01-17 14:08:11 +0100
committerMichał Górny <mgorny@gentoo.org>2022-01-18 09:38:46 +0100
commit44ea4a8c091afbee0b85443670eba504fb0e131e (patch)
tree6cf0d91577099ae272a77ac6bb9fb73ba5229f60 /eclass/distutils-r1.eclass
parentmedia-plugins/qmmp-plugin-pack: Bump to version 1.5.2 (diff)
downloadgentoo-44ea4a8c091afbee0b85443670eba504fb0e131e.tar.gz
gentoo-44ea4a8c091afbee0b85443670eba504fb0e131e.tar.bz2
gentoo-44ea4a8c091afbee0b85443670eba504fb0e131e.zip
distutils-r1.eclass: Clean the build tree in PEP517 mode
Ensure to call `esetup.py clean -a` after performing the wheel install in PEP517 mode. This is necessary since we no longer override build paths and setuptools performs the PyPy and CPython builds in the same directory. With its bad install/bdist logic, the CPython wheel ends up including PyPy3 extensions as well. Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'eclass/distutils-r1.eclass')
-rw-r--r--eclass/distutils-r1.eclass6
1 files changed, 6 insertions, 0 deletions
diff --git a/eclass/distutils-r1.eclass b/eclass/distutils-r1.eclass
index 200360510f80..ae19ca08f7e4 100644
--- a/eclass/distutils-r1.eclass
+++ b/eclass/distutils-r1.eclass
@@ -971,6 +971,12 @@ distutils-r1_python_compile() {
--no-compile-bytecode ||
die "installer failed"
+ # 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
+ fi
+
# enable venv magic inside the install tree
mkdir -p "${root}"/usr/bin || die
ln -s "${PYTHON}" "${root}/usr/bin/${EPYTHON}" || die