mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-11-21 22:47:14 -08:00
distutils-r1.eclass: Use SYSROOT condition for all cross logic
Acked by chewi. Signed-off-by: Michał Górny <mgorny@gentoo.org> Part-of: https://codeberg.org/gentoo/gentoo/pulls/1732 Merges: https://codeberg.org/gentoo/gentoo/pulls/1732
This commit is contained in:
@@ -1162,11 +1162,6 @@ distutils_pep517_install() {
|
||||
die "DISTUTILS_CONFIG_SETTINGS_JSON supported only for standalone backends"
|
||||
fi
|
||||
|
||||
# https://pyo3.rs/latest/building-and-distribution.html#cross-compiling
|
||||
if tc-is-cross-compiler; then
|
||||
local -x PYO3_CROSS_LIB_DIR=${SYSROOT}/$(python_get_stdlib)
|
||||
fi
|
||||
|
||||
local build_backend=$(_distutils-r1_get_backend)
|
||||
einfo " Building the wheel for ${PWD#${WORKDIR}/} via ${build_backend}"
|
||||
cmd+=(
|
||||
@@ -1180,6 +1175,9 @@ distutils_pep517_install() {
|
||||
cmd+=( --config-json "${config_settings}" )
|
||||
fi
|
||||
if [[ -n ${SYSROOT} ]]; then
|
||||
# https://pyo3.rs/latest/building-and-distribution.html#cross-compiling
|
||||
local -x PYO3_CROSS_LIB_DIR=${SYSROOT}/$(python_get_stdlib)
|
||||
|
||||
cmd+=( --sysroot "${SYSROOT}" )
|
||||
fi
|
||||
printf '%s\n' "${cmd[*]}"
|
||||
|
||||
Reference in New Issue
Block a user