commit: ac1735e34dad0a1f96543daa3d7ceb303b78d842 Author: Michał Górny <mgorny <AT> gentoo <DOT> org> AuthorDate: Sat Apr 9 21:42:28 2022 +0000 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> CommitDate: Mon Apr 11 19:58:38 2022 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ac1735e3
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 <AT> gentoo.org> eclass/distutils-r1.eclass | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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