From 1f0507cce3a4eb916f7ad442ad1352b535f9dcab Mon Sep 17 00:00:00 2001 From: starlet-dx <15929766099@163.com> Date: Mon, 16 Jun 2025 10:13:55 +0800 Subject: [PATCH] Remove numpy.distutils.msvccompiler to fix build failure --- Remove-numpy.distutils.msvccompiler.patch | 14 ++++++++++++++ numpy.spec | 6 +++++- 2 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 Remove-numpy.distutils.msvccompiler.patch diff --git a/Remove-numpy.distutils.msvccompiler.patch b/Remove-numpy.distutils.msvccompiler.patch new file mode 100644 index 0000000..a6df7ef --- /dev/null +++ b/Remove-numpy.distutils.msvccompiler.patch @@ -0,0 +1,14 @@ +--- a/numpy/tests/test_public_api.py 2025-06-16 14:19:18.435600257 +0800 ++++ b/numpy/tests/test_public_api.py 2025-06-16 14:40:55.752600257 +0800 +@@ -416,6 +416,11 @@ + warnings.filterwarnings('always', category=DeprecationWarning) + warnings.filterwarnings('always', category=ImportWarning) + for module_name in PRIVATE_BUT_PRESENT_MODULES: ++ if ( ++ (module_name == 'numpy.distutils.msvccompiler' and not sys.platform.startswith('win')) ++ or (module_name == 'numpy.distutils.unixccompiler' and sys.platform.startswith('win')) ++ ): ++ continue + if not check_importable(module_name): + module_names.append(module_name) + diff --git a/numpy.spec b/numpy.spec index 787ace5..aba86b4 100644 --- a/numpy.spec +++ b/numpy.spec @@ -2,13 +2,14 @@ Name: numpy Version: 1.26.4 -Release: 1 +Release: 2 Epoch: 1 Summary: A fast multidimensional array facility for Python License: ASL 2.0 URL: http://www.numpy.org/ Source0: https://github.com/%{name}/%{name}/releases/download/v%{version}/%{name}-%{version}.tar.gz +Patch0: Remove-numpy.distutils.msvccompiler.patch BuildRequires: openblas-devel BuildRequires: lapack-devel gcc-gfortran @@ -107,6 +108,9 @@ popd &> /dev/null %exclude %{python3_sitearch}/%{name}/f2py/tests/ %changelog +* Wed Jun 18 2025 yaoxin <1024769339@qq.com> - 1:1.26.4-2 +- Remove numpy.distutils.msvccompiler + * Fri Nov 29 2024 zhang_wenyu1 - 1:1.26.4-1 - Update to 1.26.4 -- Gitee