perl/Test-Simple: update to 1.302205
[oi-userland.git] / components / python / numpy / patches / 04-msvccompiler.patch
blob4718bad49b3a0aac975abd800dcc51862d324c66
1 https://github.com/numpy/numpy/pull/27406
2 Changes in test_public_api.py are needed for Python < 3.12.
4 --- numpy-2.0.2/numpy/distutils/mingw32ccompiler.py.orig
5 +++ numpy-2.0.2/numpy/distutils/mingw32ccompiler.py
6 @@ -24,7 +24,13 @@
8 import distutils.cygwinccompiler
9 from distutils.unixccompiler import UnixCCompiler
10 -from distutils.msvccompiler import get_build_version as get_build_msvc_version
12 +try:
13 + from distutils.msvccompiler import get_build_version as get_build_msvc_version
14 +except ImportError:
15 + def get_build_msvc_version():
16 + return None
18 from distutils.errors import UnknownFileError
19 from numpy.distutils.misc_util import (msvc_runtime_library,
20 msvc_runtime_version,
21 --- numpy-2.0.2/numpy/tests/test_public_api.py.orig
22 +++ numpy-2.0.2/numpy/tests/test_public_api.py
23 @@ -261,7 +261,6 @@
24 "distutils.lib2def",
25 "distutils.line_endings",
26 "distutils.mingw32ccompiler",
27 - "distutils.msvccompiler",
28 "distutils.npy_pkg_config",
29 "distutils.numpy_distribution",
30 "distutils.pathccompiler",
31 @@ -288,7 +287,7 @@
34 if sys.version_info < (3, 12):
35 - SKIP_LIST = ["numpy.distutils.msvc9compiler"]
36 + SKIP_LIST = ["numpy.distutils.msvc9compiler", "numpy.distutils.msvccompiler"]
37 else:
38 SKIP_LIST = []