1 |
commit: 44ea4a8c091afbee0b85443670eba504fb0e131e |
2 |
Author: Michał Górny <mgorny <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Jan 17 13:08:11 2022 +0000 |
4 |
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Jan 18 08:38:46 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=44ea4a8c |
7 |
|
8 |
distutils-r1.eclass: Clean the build tree in PEP517 mode |
9 |
|
10 |
Ensure to call `esetup.py clean -a` after performing the wheel install |
11 |
in PEP517 mode. This is necessary since we no longer override build |
12 |
paths and setuptools performs the PyPy and CPython builds in the same |
13 |
directory. With its bad install/bdist logic, the CPython wheel ends up |
14 |
including PyPy3 extensions as well. |
15 |
|
16 |
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org> |
17 |
|
18 |
eclass/distutils-r1.eclass | 6 ++++++ |
19 |
1 file changed, 6 insertions(+) |
20 |
|
21 |
diff --git a/eclass/distutils-r1.eclass b/eclass/distutils-r1.eclass |
22 |
index 200360510f80..ae19ca08f7e4 100644 |
23 |
--- a/eclass/distutils-r1.eclass |
24 |
+++ b/eclass/distutils-r1.eclass |
25 |
@@ -971,6 +971,12 @@ distutils-r1_python_compile() { |
26 |
--no-compile-bytecode || |
27 |
die "installer failed" |
28 |
|
29 |
+ # clean the build tree; otherwise we may end up with PyPy3 |
30 |
+ # extensions duplicated into CPython dists |
31 |
+ if [[ ${DISTUTILS_USE_PEP517:-setuptools} == setuptools ]]; then |
32 |
+ esetup.py clean -a |
33 |
+ fi |
34 |
+ |
35 |
# enable venv magic inside the install tree |
36 |
mkdir -p "${root}"/usr/bin || die |
37 |
ln -s "${PYTHON}" "${root}/usr/bin/${EPYTHON}" || die |