From e6031b53b8499df4efdcc1329bb33383fa0ed73b Mon Sep 17 00:00:00 2001 From: Sandro Mani Date: Nov 01 2022 09:04:35 +0000 Subject: Update to 1.23.4 --- diff --git a/.gitignore b/.gitignore index d983891..7670294 100644 --- a/.gitignore +++ b/.gitignore @@ -32,3 +32,4 @@ /numpy-1.21.1.tar.gz /numpy-1.21.5.tar.gz /numpy-1.22.0.tar.gz +/numpy-1.23.4.tar.gz diff --git a/mingw-numpy.spec b/mingw-numpy.spec index 5bbae50..4ce8973 100644 --- a/mingw-numpy.spec +++ b/mingw-numpy.spec @@ -1,20 +1,22 @@ %{?mingw_package_header} -%global pkgname numpy +%global pypi_name numpy -Name: mingw-%{pkgname} -Summary: MinGW Windows Python %{pkgname} library -Version: 1.22.0 -Release: 6%{?dist} +Name: mingw-%{pypi_name} +Summary: MinGW Windows Python %{pypi_name} library +Version: 1.23.4 +Release: 1%{?dist} BuildArch: noarch # Everything is BSD except for class SafeEval in numpy/lib/utils.py which is Python License: BSD and Python URL: http://www.numpy.org/ -Source0: https://github.com/%{pkgname}/%{pkgname}/releases/download/v%{version}/%{pkgname}-%{version}.tar.gz +Source0: %{pypi_source} # Don't use MSC specific stuff Patch0: numpy_mingw.patch +# Drop werror, fails with py3.11 +Patch1: numpy_werror.patch BuildRequires: mingw32-filesystem >= 102 @@ -31,48 +33,43 @@ BuildRequires: mingw64-python3-setuptools %description -%package -n mingw32-python3-%{pkgname} -Summary: MinGW Windows Python3 %{pkgname} library +%package -n mingw32-python3-%{pypi_name} +Summary: MinGW Windows Python3 %{pypi_name} library -%description -n mingw32-python3-%{pkgname} -MinGW Windows Python3 %{pkgname} library. +%description -n mingw32-python3-%{pypi_name} +MinGW Windows Python3 %{pypi_name} library. -%package -n mingw64-python3-%{pkgname} -Summary: MinGW Windows Python3 %{pkgname} library +%package -n mingw64-python3-%{pypi_name} +Summary: MinGW Windows Python3 %{pypi_name} library -%description -n mingw64-python3-%{pkgname} -MinGW Windows Python3 %{pkgname} library. +%description -n mingw64-python3-%{pypi_name} +MinGW Windows Python3 %{pypi_name} library. %{?mingw_debug_package} %prep -%autosetup -p1 -n %{pkgname}-%{version} +%autosetup -p1 -n %{pypi_name}-%{version} %build # Add -fno-asynchronous-unwind-tables to workaround "Error: invalid register for .seh_savexmm" # See https://stackoverflow.com/questions/43152633/invalid-register-for-seh-savexmm-in-cygwin -MINGW32_CFLAGS="%{mingw32_cflags} -fno-asynchronous-unwind-tables" %{mingw32_python3} setup.py build -b build_py3_mingw32 -MINGW64_CFLAGS="%{mingw64_cflags} -fno-asynchronous-unwind-tables" %{mingw64_python3} setup.py build -b build_py3_mingw64 +MINGW32_CFLAGS="%{mingw32_cflags} -fno-asynchronous-unwind-tables" %mingw32_py3_build +MINGW64_CFLAGS="%{mingw64_cflags} -fno-asynchronous-unwind-tables" %mingw64_py3_build %install -ln -s build_py3_mingw32 build -%{mingw32_python3} setup.py install -O1 --root=%{buildroot} --skip-build -rm build - -ln -s build_py3_mingw64 build -%{mingw64_python3} setup.py install -O1 --root=%{buildroot} --skip-build -rm build +%mingw32_py3_install +%mingw64_py3_install # FIXME: These files are not installed for some reason -cp -a build_py3_mingw32/src.mingw-%{mingw32_python3_version}/numpy/core/include/numpy/*.h %{buildroot}%{mingw32_python3_sitearch}/numpy/core/include/numpy/ -cp -a build_py3_mingw32/src.mingw-%{mingw32_python3_version}/numpy/core/include/numpy/*.txt %{buildroot}%{mingw32_python3_sitearch}/numpy/core/include/numpy/ -cp -a build_py3_mingw64/src.mingw-%{mingw64_python3_version}/numpy/core/include/numpy/*.h %{buildroot}%{mingw64_python3_sitearch}/numpy/core/include/numpy/ -cp -a build_py3_mingw64/src.mingw-%{mingw64_python3_version}/numpy/core/include/numpy/*.txt %{buildroot}%{mingw64_python3_sitearch}/numpy/core/include/numpy/ +cp -a build_mingw32/src.mingw-%{mingw32_python3_version}/numpy/core/include/numpy/*.h %{buildroot}%{mingw32_python3_sitearch}/numpy/core/include/numpy/ +cp -a build_mingw32/src.mingw-%{mingw32_python3_version}/numpy/core/include/numpy/*.txt %{buildroot}%{mingw32_python3_sitearch}/numpy/core/include/numpy/ +cp -a build_mingw64/src.mingw-%{mingw64_python3_version}/numpy/core/include/numpy/*.h %{buildroot}%{mingw64_python3_sitearch}/numpy/core/include/numpy/ +cp -a build_mingw64/src.mingw-%{mingw64_python3_version}/numpy/core/include/numpy/*.txt %{buildroot}%{mingw64_python3_sitearch}/numpy/core/include/numpy/ # Symlink includedir mkdir -p %{buildroot}%{mingw32_includedir} @@ -80,29 +77,30 @@ mkdir -p %{buildroot}%{mingw64_includedir} ln -s %{mingw32_python3_sitearch}/numpy/core/include/numpy/ %{buildroot}%{mingw32_includedir}/numpy ln -s %{mingw64_python3_sitearch}/numpy/core/include/numpy/ %{buildroot}%{mingw64_includedir}/numpy -# Exclude debug files from the main files (note: the debug files are only created after %%install, so we can't search for them directly) -find %{buildroot}%{mingw32_prefix} | grep -E '.(exe|dll|pyd)$' | sed 's|^%{buildroot}\(.*\)$|%%exclude \1.debug|' > mingw32-%{pkgname}.debugfiles -find %{buildroot}%{mingw64_prefix} | grep -E '.(exe|dll|pyd)$' | sed 's|^%{buildroot}\(.*\)$|%%exclude \1.debug|' > mingw64-%{pkgname}.debugfiles - -%files -n mingw32-python3-%{pkgname} -f mingw32-%{pkgname}.debugfiles +%files -n mingw32-python3-%{pypi_name} %license LICENSE.txt %{mingw32_bindir}/f2py %{mingw32_bindir}/f2py3 %{mingw32_bindir}/f2py%{mingw32_python3_version} -%{mingw32_includedir}/%{pkgname} -%{mingw32_python3_sitearch}/* +%{mingw32_includedir}/%{pypi_name} +%{mingw32_python3_sitearch}/%{pypi_name}/ +%{mingw32_python3_sitearch}/%{pypi_name}-%{version}-py%{mingw32_python3_version}.egg-info/ -%files -n mingw64-python3-%{pkgname} -f mingw64-%{pkgname}.debugfiles +%files -n mingw64-python3-%{pypi_name} %license LICENSE.txt %{mingw64_bindir}/f2py %{mingw64_bindir}/f2py3 %{mingw64_bindir}/f2py%{mingw32_python3_version} -%{mingw64_includedir}/%{pkgname} -%{mingw64_python3_sitearch}/* +%{mingw64_includedir}/%{pypi_name} +%{mingw64_python3_sitearch}/%{pypi_name}/ +%{mingw64_python3_sitearch}/%{pypi_name}-%{version}-py%{mingw64_python3_version}.egg-info/ %changelog +* Wed Oct 19 2022 Sandro Mani - 1.23.4-1 +- Update to 1.23.4 + * Thu Jul 21 2022 Fedora Release Engineering - 1.22.0-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild diff --git a/numpy_mingw.patch b/numpy_mingw.patch index 9e9eaeb..c27d62c 100644 --- a/numpy_mingw.patch +++ b/numpy_mingw.patch @@ -1,20 +1,20 @@ -diff -rupN --no-dereference numpy-1.22.0/numpy/core/include/numpy/npy_common.h numpy-1.22.0-new/numpy/core/include/numpy/npy_common.h ---- numpy-1.22.0/numpy/core/include/numpy/npy_common.h 2021-12-20 02:19:55.583084600 +0100 -+++ numpy-1.22.0-new/numpy/core/include/numpy/npy_common.h 2022-01-07 10:05:00.868858560 +0100 -@@ -182,8 +182,8 @@ - - /* mingw based on 3.4.5 has lseek but not ftell/fseek */ - #if defined(__MINGW32__) || defined(__MINGW64__) --extern int __cdecl _fseeki64(FILE *, long long, int); --extern long long __cdecl _ftelli64(FILE *); -+extern _CRTIMP int __cdecl _fseeki64(FILE *, long long, int); -+extern _CRTIMP long long __cdecl _ftelli64(FILE *); - #endif +diff -rupN --no-dereference numpy-1.23.4/numpy/core/setup.py numpy-1.23.4-new/numpy/core/setup.py +--- numpy-1.23.4/numpy/core/setup.py 2022-10-12 05:12:48.920632800 +0200 ++++ numpy-1.23.4-new/numpy/core/setup.py 2022-10-20 00:13:05.229596329 +0200 +@@ -80,9 +80,7 @@ def can_link_svml(): + if NPY_DISABLE_SVML: + return False + platform = sysconfig.get_platform() +- return ("x86_64" in platform +- and "linux" in platform +- and sys.maxsize > 2**31) ++ return False - #define npy_fseek _fseeki64 -diff -rupN --no-dereference numpy-1.22.0/numpy/random/src/mt19937/mt19937.h numpy-1.22.0-new/numpy/random/src/mt19937/mt19937.h ---- numpy-1.22.0/numpy/random/src/mt19937/mt19937.h 2021-11-03 19:18:02.582594000 +0100 -+++ numpy-1.22.0-new/numpy/random/src/mt19937/mt19937.h 2022-01-07 10:05:00.869858563 +0100 + def check_svml_submodule(svmlpath): + if not os.path.exists(svmlpath + "/README.md"): +diff -rupN --no-dereference numpy-1.23.4/numpy/random/src/mt19937/mt19937.h numpy-1.23.4-new/numpy/random/src/mt19937/mt19937.h +--- numpy-1.23.4/numpy/random/src/mt19937/mt19937.h 2022-10-12 05:12:49.080644100 +0200 ++++ numpy-1.23.4-new/numpy/random/src/mt19937/mt19937.h 2022-10-20 00:13:05.230596329 +0200 @@ -2,7 +2,7 @@ #include #include @@ -24,9 +24,9 @@ diff -rupN --no-dereference numpy-1.22.0/numpy/random/src/mt19937/mt19937.h nump #define inline __forceinline #endif -diff -rupN --no-dereference numpy-1.22.0/numpy/random/src/pcg64/pcg64.h numpy-1.22.0-new/numpy/random/src/pcg64/pcg64.h ---- numpy-1.22.0/numpy/random/src/pcg64/pcg64.h 2021-11-03 19:18:02.582594000 +0100 -+++ numpy-1.22.0-new/numpy/random/src/pcg64/pcg64.h 2022-01-07 10:05:00.869858563 +0100 +diff -rupN --no-dereference numpy-1.23.4/numpy/random/src/pcg64/pcg64.h numpy-1.23.4-new/numpy/random/src/pcg64/pcg64.h +--- numpy-1.23.4/numpy/random/src/pcg64/pcg64.h 2022-10-12 05:12:49.080644100 +0200 ++++ numpy-1.23.4-new/numpy/random/src/pcg64/pcg64.h 2022-10-20 00:13:05.230596329 +0200 @@ -52,7 +52,7 @@ #include @@ -36,9 +36,9 @@ diff -rupN --no-dereference numpy-1.22.0/numpy/random/src/pcg64/pcg64.h numpy-1. #include #define inline __forceinline #endif -diff -rupN --no-dereference numpy-1.22.0/numpy/random/src/philox/philox.h numpy-1.22.0-new/numpy/random/src/philox/philox.h ---- numpy-1.22.0/numpy/random/src/philox/philox.h 2021-11-03 19:18:02.583594000 +0100 -+++ numpy-1.22.0-new/numpy/random/src/philox/philox.h 2022-01-07 10:05:00.869858563 +0100 +diff -rupN --no-dereference numpy-1.23.4/numpy/random/src/philox/philox.h numpy-1.23.4-new/numpy/random/src/philox/philox.h +--- numpy-1.23.4/numpy/random/src/philox/philox.h 2022-10-12 05:12:49.080644100 +0200 ++++ numpy-1.23.4-new/numpy/random/src/philox/philox.h 2022-10-20 00:13:05.230596329 +0200 @@ -33,7 +33,7 @@ static NPY_INLINE uint64_t mulhilo64(uin return (uint64_t)product; } @@ -48,15 +48,3 @@ diff -rupN --no-dereference numpy-1.22.0/numpy/random/src/philox/philox.h numpy- #include #if defined(_WIN64) && defined(_M_AMD64) #pragma intrinsic(_umul128) -diff -rupN numpy-1.22.0/numpy/core/setup.py numpy-1.22.0-new/numpy/core/setup.py ---- numpy-1.22.0/numpy/core/setup.py 2021-12-30 04:45:56.019685500 +0100 -+++ numpy-1.22.0-new/numpy/core/setup.py 2022-01-23 23:04:17.757305613 +0100 -@@ -70,7 +70,7 @@ def can_link_svml(): - """ - machine = platform.machine() - system = platform.system() -- return "x86_64" in machine and system == "Linux" -+ return False - - def check_svml_submodule(svmlpath): - if not os.path.exists(svmlpath + "/README.md"): diff --git a/numpy_werror.patch b/numpy_werror.patch new file mode 100644 index 0000000..4f2b59e --- /dev/null +++ b/numpy_werror.patch @@ -0,0 +1,12 @@ +diff -rupN --no-dereference numpy-1.23.4/numpy/distutils/ccompiler_opt.py numpy-1.23.4-new/numpy/distutils/ccompiler_opt.py +--- numpy-1.23.4/numpy/distutils/ccompiler_opt.py 2022-10-12 05:12:48.996638300 +0200 ++++ numpy-1.23.4-new/numpy/distutils/ccompiler_opt.py 2022-10-20 00:13:05.505596313 +0200 +@@ -203,7 +203,7 @@ class _Config: + # native usually works only with x86 + native = '-march=native', + opt = '-O3', +- werror = '-Werror', ++ werror = '', + ), + clang = dict( + native = '-march=native', diff --git a/sources b/sources index 9bb02fe..fa9740a 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (numpy-1.22.0.tar.gz) = 368b2cf0bee4dd7fb7d6db96d87984ff4235f0286534149cbe6597e9b690bc8a6643b71d067e43b9190a3186325423b84441c1659a6681adf8a03231c60f51bf +SHA512 (numpy-1.23.4.tar.gz) = 727ca8950b0fbd5670e939b1c9c5cea852781ec4254d56a1659a91dc0430fc10b01ffdd16e1bb28a62319f91029e087024f4c6298bfc859a6050bfb507edcff8