Only one variable needs to be set. For details, see
https://pyo3.rs/latest/building-and-distribution.html#cross-compiling.

Signed-off-by: James Le Cuirot <ch...@gentoo.org>
---
 eclass/distutils-r1.eclass | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/eclass/distutils-r1.eclass b/eclass/distutils-r1.eclass
index 743242b2acee8..9289392f84b38 100644
--- a/eclass/distutils-r1.eclass
+++ b/eclass/distutils-r1.eclass
@@ -1390,6 +1390,9 @@ distutils_pep517_install() {
                        ;;
        esac

+       # https://pyo3.rs/latest/building-and-distribution.html#cross-compiling
+       tc-is-cross-compiler && local -x 
PYO3_CROSS_LIB_DIR=${SYSROOT}/$(python_get_stdlib)
+
        local build_backend=$(_distutils-r1_get_backend)
        einfo "  Building the wheel for ${PWD#${WORKDIR}/} via ${build_backend}"
        cmd+=(
--
2.45.2

Reply via email to