commit: 83739e9677a6835c9fa49c0c98e9d7bc1e331413 Author: James Le Cuirot <chewi <AT> gentoo <DOT> org> AuthorDate: Thu Jul 25 21:20:02 2024 +0000 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> CommitDate: Tue Aug 6 08:30:15 2024 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=83739e96
distutils-r1.eclass: Support cross-compiling with PyO3 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 <chewi <AT> gentoo.org> Signed-off-by: Michał Górny <mgorny <AT> gentoo.org> Closes: https://github.com/gentoo/gentoo/pull/37708 Signed-off-by: Michał Górny <mgorny <AT> gentoo.org> eclass/distutils-r1.eclass | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/eclass/distutils-r1.eclass b/eclass/distutils-r1.eclass index 129ba21ab0d4..0f9dc8d14d5e 100644 --- a/eclass/distutils-r1.eclass +++ b/eclass/distutils-r1.eclass @@ -1391,6 +1391,11 @@ distutils_pep517_install() { ;; esac + # 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+=(
