From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 32E0B159C96 for ; Thu, 25 Jul 2024 21:26:14 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 38214E2AF9; Thu, 25 Jul 2024 21:25:52 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 87705E2AF6 for ; Thu, 25 Jul 2024 21:25:51 +0000 (UTC) From: James Le Cuirot To: gentoo-dev Cc: python@gentoo.org, James Le Cuirot Subject: [gentoo-dev] [PATCH 8/8] distutils-r1.eclass: Support cross-compiling with PyO3 Date: Thu, 25 Jul 2024 22:22:51 +0100 Message-ID: <20240725212529.26271-2-chewi@gentoo.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240725212529.26271-1-chewi@gentoo.org> References: <20240725180612.19453-1-chewi@gentoo.org> <20240725212529.26271-1-chewi@gentoo.org> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@lists.gentoo.org Reply-to: gentoo-dev@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Archives-Salt: 85a52328-3844-4e8e-b06a-74bae35c2f2b X-Archives-Hash: 3c5cbf6249c9555ebf4daa65606d9ea3 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 --- 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