From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-commits+bounces-1479884-garchives=archives.gentoo.org@lists.gentoo.org>
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 4352515800F
	for <garchives@archives.gentoo.org>; Mon, 23 Jan 2023 22:31:52 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id 30F27E082B;
	Mon, 23 Jan 2023 22:31:51 +0000 (UTC)
Received: from smtp.gentoo.org (woodpecker.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 15036E082B
	for <gentoo-commits@lists.gentoo.org>; Mon, 23 Jan 2023 22:31:50 +0000 (UTC)
Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52])
	(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 smtp.gentoo.org (Postfix) with ESMTPS id ED23F340C40
	for <gentoo-commits@lists.gentoo.org>; Mon, 23 Jan 2023 22:31:49 +0000 (UTC)
Received: from localhost.localdomain (localhost [IPv6:::1])
	by oystercatcher.gentoo.org (Postfix) with ESMTP id 6A030807
	for <gentoo-commits@lists.gentoo.org>; Mon, 23 Jan 2023 22:31:47 +0000 (UTC)
From: "James Le Cuirot" <chewi@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Content-Transfer-Encoding: 8bit
Content-type: text/plain; charset=UTF-8
Reply-To: gentoo-dev@lists.gentoo.org, "James Le Cuirot" <chewi@gentoo.org>
Message-ID: <1674513037.708460e50bca1d251a826bf74c00a3021ea76f10.chewi@gentoo>
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-lang/python/
X-VCS-Repository: repo/gentoo
X-VCS-Files: dev-lang/python/python-3.10.9.ebuild dev-lang/python/python-3.11.1.ebuild dev-lang/python/python-3.12.0_alpha4.ebuild dev-lang/python/python-3.8.16-r3.ebuild dev-lang/python/python-3.9.16.ebuild
X-VCS-Directories: dev-lang/python/
X-VCS-Committer: chewi
X-VCS-Committer-Name: James Le Cuirot
X-VCS-Revision: 708460e50bca1d251a826bf74c00a3021ea76f10
X-VCS-Branch: master
Date: Mon, 23 Jan 2023 22:31:47 +0000 (UTC)
Precedence: bulk
List-Post: <mailto:gentoo-commits@lists.gentoo.org>
List-Help: <mailto:gentoo-commits+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org>
X-BeenThere: gentoo-commits@lists.gentoo.org
X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply
X-Archives-Salt: 40b6cfad-fa3c-426f-be53-c15ae7aad15e
X-Archives-Hash: d1de4ebe2dca848b9f5e63b28fc0441f

commit:     708460e50bca1d251a826bf74c00a3021ea76f10
Author:     James Le Cuirot <chewi <AT> gentoo <DOT> org>
AuthorDate: Mon Jan 23 22:30:37 2023 +0000
Commit:     James Le Cuirot <chewi <AT> gentoo <DOT> org>
CommitDate: Mon Jan 23 22:30:37 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=708460e5

dev-lang/python: Fix cross-compiling, particularly 3.11

Despite efforts to avoid needing the same version of Python installed on the
build host, this was still required due to libpython.so not being found.

Even when it was found, it was erroneously looking under /usr rather than ${S}
for the Python modules. For some unknown reason, this caused 3.11 to fail.

The easiest solution is to just build a static Python with no libpython.so. This
also ensures modules are loaded from ${S}.

Closes: https://bugs.gentoo.org/889874
Signed-off-by: James Le Cuirot <chewi <AT> gentoo.org>

 dev-lang/python/python-3.10.9.ebuild        | 3 +++
 dev-lang/python/python-3.11.1.ebuild        | 3 +++
 dev-lang/python/python-3.12.0_alpha4.ebuild | 3 +++
 dev-lang/python/python-3.8.16-r3.ebuild     | 3 +++
 dev-lang/python/python-3.9.16.ebuild        | 3 +++
 5 files changed, 15 insertions(+)

diff --git a/dev-lang/python/python-3.10.9.ebuild b/dev-lang/python/python-3.10.9.ebuild
index 1b3700f2b2b9..390bba98511d 100644
--- a/dev-lang/python/python-3.10.9.ebuild
+++ b/dev-lang/python/python-3.10.9.ebuild
@@ -246,6 +246,9 @@ src_configure() {
 
 			--libdir="${cbuild_libdir:2}"
 
+			# Avoid needing to load the right libpython.so.
+			--disable-shared
+
 			# As minimal as possible for the mini CBUILD Python
 			# we build just for cross.
 			--without-lto

diff --git a/dev-lang/python/python-3.11.1.ebuild b/dev-lang/python/python-3.11.1.ebuild
index f0e59a041105..5d2077e3f7c7 100644
--- a/dev-lang/python/python-3.11.1.ebuild
+++ b/dev-lang/python/python-3.11.1.ebuild
@@ -235,6 +235,9 @@ src_configure() {
 
 			--libdir="${cbuild_libdir:2}"
 
+			# Avoid needing to load the right libpython.so.
+			--disable-shared
+
 			# As minimal as possible for the mini CBUILD Python
 			# we build just for cross to satisfy --with-build-python.
 			--without-lto

diff --git a/dev-lang/python/python-3.12.0_alpha4.ebuild b/dev-lang/python/python-3.12.0_alpha4.ebuild
index 93317e0a722a..e3431855d0e7 100644
--- a/dev-lang/python/python-3.12.0_alpha4.ebuild
+++ b/dev-lang/python/python-3.12.0_alpha4.ebuild
@@ -229,6 +229,9 @@ src_configure() {
 
 			--libdir="${cbuild_libdir:2}"
 
+			# Avoid needing to load the right libpython.so.
+			--disable-shared
+
 			# As minimal as possible for the mini CBUILD Python
 			# we build just for cross to satisfy --with-build-python.
 			--without-lto

diff --git a/dev-lang/python/python-3.8.16-r3.ebuild b/dev-lang/python/python-3.8.16-r3.ebuild
index 848ce784881c..3032411863bc 100644
--- a/dev-lang/python/python-3.8.16-r3.ebuild
+++ b/dev-lang/python/python-3.8.16-r3.ebuild
@@ -203,6 +203,9 @@ src_configure() {
 
 			--libdir="${cbuild_libdir:2}"
 
+			# Avoid needing to load the right libpython.so.
+			--disable-shared
+
 			# As minimal as possible for the mini CBUILD Python
 			# we build just for cross.
 			--without-lto

diff --git a/dev-lang/python/python-3.9.16.ebuild b/dev-lang/python/python-3.9.16.ebuild
index f6dbbd4312df..cb84012fc09b 100644
--- a/dev-lang/python/python-3.9.16.ebuild
+++ b/dev-lang/python/python-3.9.16.ebuild
@@ -240,6 +240,9 @@ src_configure() {
 
 			--libdir="${cbuild_libdir:2}"
 
+			# Avoid needing to load the right libpython.so.
+			--disable-shared
+
 			# As minimal as possible for the mini CBUILD Python
 			# we build just for cross.
 			--without-lto