From mboxrd@z Thu Jan 1 00:00:00 1970 Delivery-date: Thu, 15 Jan 2026 16:12:28 +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 1vgP1Q-001dQS-2w for lore@lore.pengutronix.de; Thu, 15 Jan 2026 16:12:28 +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 1vgP1Q-000885-4m; Thu, 15 Jan 2026 16:12:28 +0100 Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.whiteo.stw.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1vgP11-0007bW-Kx; Thu, 15 Jan 2026 16:12:03 +0100 Received: from dude05.red.stw.pengutronix.de ([2a0a:edc0:0:1101:1d::54]) by drehscheibe.grey.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vgP11-000m40-12; Thu, 15 Jan 2026 16:12:02 +0100 Received: from mol by dude05.red.stw.pengutronix.de with local (Exim 4.98.2) (envelope-from ) id 1vgP10-00000000y36-2W37; Thu, 15 Jan 2026 16:12:02 +0100 From: Michael Olbrich To: ptxdist@pengutronix.de Date: Thu, 15 Jan 2026 16:12:02 +0100 Message-ID: <20260115151202.230821-1-m.olbrich@pengutronix.de> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20251216152837.668958-1-m.heidelberg@cab.de> References: <20251216152837.668958-1-m.heidelberg@cab.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: Re: [ptxdist] [APPLIED] 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: , 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 Thanks, applied as ca274b04a27b0ede0890f925a790098da1df9909. Michael [sent from post-receive hook] On Thu, 15 Jan 2026 16:12:02 +0100, Markus Heidelberg wrote: > Fixes these errors: > ModuleNotFoundError: No module named 'distutils.msvccompiler' > > Signed-off-by: Markus Heidelberg > Message-Id: <20251216152837.668958-1-m.heidelberg@cab.de> > Signed-off-by: Michael Olbrich > > 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 000000000000..c24cff9f9b08 > --- /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 a493ac22746e..57cb0bc5b3f2 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