mirror of
https://github.com/flatcar/scripts.git
synced 2025-11-26 21:11:54 +01:00
eclass/distutils-r1: Sync with Gentoo
It's from Gentoo commit 920edc504064fa38caa462b4d378114599f65925.
This commit is contained in:
parent
ceca5701b4
commit
bb9bca9a18
@ -1505,32 +1505,28 @@ distutils-r1_python_compile() {
|
||||
|
||||
_python_check_EPYTHON
|
||||
|
||||
case ${DISTUTILS_USE_PEP517:-setuptools} in
|
||||
setuptools)
|
||||
# call setup.py build when using setuptools (either via PEP517
|
||||
# or in legacy mode)
|
||||
|
||||
# distutils is parallel-capable since py3.5
|
||||
local jobs=$(makeopts_jobs "${MAKEOPTS} ${*}")
|
||||
|
||||
if [[ ${DISTUTILS_USE_PEP517} ]]; then
|
||||
mkdir -p "${BUILD_DIR}" || die
|
||||
local -x DIST_EXTRA_CONFIG="${BUILD_DIR}/extra-setup.cfg"
|
||||
cat > "${DIST_EXTRA_CONFIG}" <<-EOF || die
|
||||
[build]
|
||||
build_base = ${BUILD_DIR}/build
|
||||
|
||||
[build_ext]
|
||||
parallel = ${jobs}
|
||||
EOF
|
||||
else
|
||||
_distutils-r1_copy_egg_info
|
||||
esetup.py build -j "${jobs}" "${@}"
|
||||
fi
|
||||
;;
|
||||
case ${DISTUTILS_USE_PEP517:-unset} in
|
||||
no)
|
||||
return
|
||||
;;
|
||||
unset)
|
||||
# legacy mode
|
||||
_distutils-r1_copy_egg_info
|
||||
esetup.py build -j "$(makeopts_jobs "${MAKEOPTS} ${*}")" "${@}"
|
||||
;;
|
||||
*)
|
||||
# we do this for all build systems, since other backends
|
||||
# and custom hooks may wrap setuptools
|
||||
mkdir -p "${BUILD_DIR}" || die
|
||||
local -x DIST_EXTRA_CONFIG="${BUILD_DIR}/extra-setup.cfg"
|
||||
cat > "${DIST_EXTRA_CONFIG}" <<-EOF || die
|
||||
[build]
|
||||
build_base = ${BUILD_DIR}/build
|
||||
|
||||
[build_ext]
|
||||
parallel = $(makeopts_jobs "${MAKEOPTS} ${*}")
|
||||
EOF
|
||||
;;
|
||||
esac
|
||||
|
||||
if [[ ${DISTUTILS_USE_PEP517} ]]; then
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user