commit: 44ea4a8c091afbee0b85443670eba504fb0e131e Author: Michał Górny <mgorny <AT> gentoo <DOT> org> AuthorDate: Mon Jan 17 13:08:11 2022 +0000 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> CommitDate: Tue Jan 18 08:38:46 2022 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=44ea4a8c
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 <AT> gentoo.org> eclass/distutils-r1.eclass | 6 ++++++ 1 file changed, 6 insertions(+) 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