From mboxrd@z Thu Jan 1 00:00:00 1970 Delivery-date: Tue, 16 Dec 2025 16:29:20 +0100 Received: from metis.whiteo.stw.pengutronix.de ([2a0a:edc0:2:b01:1d::104]) by lore.white.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vVWzH-00C9YA-2T for lore@lore.pengutronix.de; Tue, 16 Dec 2025 16:29:19 +0100 Received: from localhost ([127.0.0.1] helo=metis.whiteo.stw.pengutronix.de) by metis.whiteo.stw.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1vVWzH-0004fu-JF; Tue, 16 Dec 2025 16:29:19 +0100 Received: from mx07-007fc201.pphosted.com ([185.132.181.212]) by metis.whiteo.stw.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1vVWyx-0004e1-Rw for ptxdist@pengutronix.de; Tue, 16 Dec 2025 16:29:00 +0100 Received: from pps.filterd (m0456228.ppops.net [127.0.0.1]) by mx07-007fc201.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 5BGFPdS71114870 for ; Tue, 16 Dec 2025 16:28:58 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cab.de; h=cc :content-transfer-encoding:content-type:date:from:message-id :mime-version:subject:to; s=pp-2025; bh=GH9yPAUxwq++h32uyzpDAXk9 UWA50e7ieiVnRzg9TV8=; b=ftcONF4ZOBtsVVeuroxfn/c0JH+EWwh9MQj7/ROb ACvC3P5qbhwRxuoeOnBlqdNpBcktfU0S3m67uBqCKPnpSrsATnUwkBQ4JbGYNBKX 7atLDocnnkpB9nfFqLC6gLIVjoXJ0lkb5AOwyq5ByZKXHc1f28U7D+OaKQjx2zEZ DXk4bKEFVGD2NxxW+mjkBAP1vnjAaW7977za1aTPPCsy1cmwZy6qRDoBQJFrIxoA stK3hYwBkB21kSzhJshhZs/YPDWIRXxxb6+eQxj8OE22bcZgmZ39KOYHXAk45V5t jwwFSO0linl1qQVJVmbxkLzZp7eMIIGUQLXwFlwV8Z/PWw== Received: from adranos.cab.de (adranos.cab.de [46.232.229.107]) by mx07-007fc201.pphosted.com (PPS) with ESMTPS id 4b1nhs926g-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Tue, 16 Dec 2025 16:28:58 +0100 (CET) Received: from KAN23-025.cab.de (10.10.3.180) by Adranos.cab.de (10.10.1.54) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.29; Tue, 16 Dec 2025 16:29:16 +0100 To: Date: Tue, 16 Dec 2025 16:28:37 +0100 Message-ID: <20251216152837.668958-1-m.heidelberg@cab.de> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.10.3.180] X-ClientProxiedBy: Adranos.cab.de (10.10.1.54) To Adranos.cab.de (10.10.1.54) X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUxMjE2MDEzMyBTYWx0ZWRfX8s7wMDX9iBIS NFq8mS+4G9mtEeGZ8XxYmqED7vpB5ATp/fOucnKdnQQJyqZnl+23n4rwwZsX75+LcqM5SEZkRVY NZ5sgKeLCzYmCcsaMdnhUMCkrcpfIcwk0giEdEhxDqThoVvgXBFgW8QajJdQx24MWOSlmJ+kj4N MI07G+nniZMbTRlbt3wetoY1Bp7Pn6plsMEGeyC6ZMHjMqlTWEoo1Dst+Ylqm1NE5/lAZB1mj1h ZfoziDXUuS22WnYt6ZqiYNOiWOUlulJNsuwHaUCwE5lbLTX/COuDFr11kVfT5cJzir5V3GthfYH 6JNEluhwA/txUW2cle3S4/mwM263svvE2UtOsofdOaKDW2SNYr0CADpTKniFADaFLyJShsFQs0z di6qGdRpVEwSfTQJbQBOxpp0GF4AXw== X-Proofpoint-ORIG-GUID: 4aw5zm32-apphWiC5zkCjJQswAE6Z_vL X-Authority-Analysis: v=2.4 cv=ToDrRTXh c=1 sm=1 tr=0 ts=69417aba cx=c_pps a=LmW7qmVeM6tFdl5svFU9Cg==:117 a=LmW7qmVeM6tFdl5svFU9Cg==:17 a=kldc_9v1VKEA:10 a=wP3pNCr1ah4A:10 a=VkNPw1HP01LnGYTKEx00:22 a=NEAV23lmAAAA:8 a=PIGx_Iz1XH6NTwMP0McA:9 X-Proofpoint-GUID: 4aw5zm32-apphWiC5zkCjJQswAE6Z_vL X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on metis.whiteo.stw.pengutronix.de X-Spam-Level: X-Spam-Status: No, score=-2.7 required=4.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Subject: [ptxdist] [PATCH] python3-numpy: fix building with setuptools >= 74.0.0 X-BeenThere: ptxdist@pengutronix.de X-Mailman-Version: 2.1.29 Precedence: list List-Id: PTXdist Development Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Markus Heidelberg via ptxdist Reply-To: ptxdist@pengutronix.de Cc: Markus Heidelberg Sender: "ptxdist" X-SA-Exim-Connect-IP: 127.0.0.1 X-SA-Exim-Mail-From: ptxdist-bounces@pengutronix.de X-SA-Exim-Scanned: No (on metis.whiteo.stw.pengutronix.de); SAEximRunCond expanded to false Fixes these errors: ModuleNotFoundError: No module named 'distutils.msvccompiler' Signed-off-by: Markus Heidelberg --- Is this an acceptable fix? The example on the NumPy website works. Later I found this fix: https://github.com/numpy/numpy/commit/1cc02cc6710384c52e1082a33d1617504eaed296 But there was no fix for the second build error, so I kept my solution. ...istutils.msvccompiler-in-setuptools-.patch | 45 +++++++++++++++++++ patches/numpy-1.26.4/series | 3 +- 2 files changed, 47 insertions(+), 1 deletion(-) create mode 100644 patches/numpy-1.26.4/0002-handle-missing-distutils.msvccompiler-in-setuptools-.patch diff --git a/patches/numpy-1.26.4/0002-handle-missing-distutils.msvccompiler-in-setuptools-.patch b/patches/numpy-1.26.4/0002-handle-missing-distutils.msvccompiler-in-setuptools-.patch new file mode 100644 index 000000000..c24cff9f9 --- /dev/null +++ b/patches/numpy-1.26.4/0002-handle-missing-distutils.msvccompiler-in-setuptools-.patch @@ -0,0 +1,45 @@ +From: Markus Heidelberg +Date: Tue, 16 Dec 2025 11:50:00 +0100 +Subject: [PATCH] handle missing distutils.msvccompiler in setuptools >= 74.0.0 + +distutils._msvccompiler exists, but only provides the MSVCCompiler +class, not the get_build_version function. + +Signed-off-by: Markus Heidelberg +--- + numpy/distutils/mingw32ccompiler.py | 4 +++- + numpy/distutils/msvccompiler.py | 2 +- + 2 files changed, 4 insertions(+), 2 deletions(-) + +diff --git a/numpy/distutils/mingw32ccompiler.py b/numpy/distutils/mingw32ccompiler.py +index 4763f41ad326..f504d8b6223d 100644 +--- a/numpy/distutils/mingw32ccompiler.py ++++ b/numpy/distutils/mingw32ccompiler.py +@@ -24,13 +24,15 @@ + + import distutils.cygwinccompiler + from distutils.unixccompiler import UnixCCompiler +-from distutils.msvccompiler import get_build_version as get_build_msvc_version + from distutils.errors import UnknownFileError + from numpy.distutils.misc_util import (msvc_runtime_library, + msvc_runtime_version, + msvc_runtime_major, + get_build_architecture) + ++def get_build_msvc_version(): ++ return None ++ + def get_msvcr_replacement(): + """Replacement for outdated version of get_msvcr from cygwinccompiler""" + msvcr = msvc_runtime_library() +diff --git a/numpy/distutils/msvccompiler.py b/numpy/distutils/msvccompiler.py +index 2b93221baac8..5e2a030404da 100644 +--- a/numpy/distutils/msvccompiler.py ++++ b/numpy/distutils/msvccompiler.py +@@ -1,5 +1,5 @@ + import os +-from distutils.msvccompiler import MSVCCompiler as _MSVCCompiler ++from distutils._msvccompiler import MSVCCompiler as _MSVCCompiler + + from .system_info import platform_bits + diff --git a/patches/numpy-1.26.4/series b/patches/numpy-1.26.4/series index a493ac227..57cb0bc5b 100644 --- a/patches/numpy-1.26.4/series +++ b/patches/numpy-1.26.4/series @@ -1,4 +1,5 @@ # generated by git-ptx-patches #tag:base --start-number 1 0001-use-path-from-environment-only-for-library_dirs.patch -# d9bc0f9a910e0d311ad4c7761b8f6062 - git-ptx-patches magic +0002-handle-missing-distutils.msvccompiler-in-setuptools-.patch +# 3e55650c70507297b27d494f0e36c7d4 - git-ptx-patches magic -- 2.43.0