summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2022-04-09 23:42:28 +0200
committerMichał Górny <mgorny@gentoo.org>2022-04-11 21:58:38 +0200
commitac1735e34dad0a1f96543daa3d7ceb303b78d842 (patch)
tree628bc2dc82da5cab8466df1152a8431723bdf364 /eclass/distutils-r1.eclass
parentdistutils-r1.eclass: Update namespace package doc URL (diff)
downloadgentoo-ac1735e34dad0a1f96543daa3d7ceb303b78d842.tar.gz
gentoo-ac1735e34dad0a1f96543daa3d7ceb303b78d842.tar.bz2
gentoo-ac1735e34dad0a1f96543daa3d7ceb303b78d842.zip
distutils-r1.eclass: Call build_ext instead of build in PEP517 mode
Call `setup.py build_ext` instead of the wholesale `build` in PEP517 mode. After all, the call is not strictly necessary; it is only done in order to build C extensions in parallel (PEP517 backend does not support specifying job count). By skipping the other tasks build command does (and then repeats via PEP517 call), the ebuild can build a few seconds faster. Since this is a potentially breaking change (but very unlikely to actually break anything), let's test it behind GPEP517_TESTING. 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, 5 insertions, 1 deletions
diff --git a/eclass/distutils-r1.eclass b/eclass/distutils-r1.eclass
index cf6998e2680e..1a0097647c41 100644
--- a/eclass/distutils-r1.eclass
+++ b/eclass/distutils-r1.eclass
@@ -1132,7 +1132,11 @@ distutils-r1_python_compile() {
jobs=$(( nproc + 1 ))
fi
- esetup.py build -j "${jobs}" "${@}"
+ if [[ ${DISTUTILS_USE_PEP517} && ${GPEP517_TESTING} ]]; then
+ esetup.py build_ext -j "${jobs}" "${@}"
+ else
+ esetup.py build -j "${jobs}" "${@}"
+ fi
fi
if [[ ${DISTUTILS_USE_PEP517} ]]; then