From 3d9813f2230475ece97a266c07e09cb76e06e33c Mon Sep 17 00:00:00 2001 From: Syrus Dark Date: Thu, 11 Feb 2021 23:00:41 +0530 Subject: [PATCH] python-numpy: update to 1.20.1 --- .../0001-detect-mingw-environment.patch | 11 +++-- .../0002-fix-finding-python2.patch | 46 ++++++++++--------- .../0003-gfortran-better-version-check.patch | 8 ++-- .../0004-fix-testsuite.patch | 8 ++-- ...stack-boundary-32bit-optimized-64bit.patch | 11 +++-- .../0006-disable-visualcompaq-for-mingw.patch | 13 +++--- ...7-disable-64bit-experimental-warning.patch | 12 +++-- ...-mingw-gcc-doesnt-support-visibility.patch | 8 ++-- .../0009-disable-old-mingw-stuff.patch | 8 ++-- .../0010-mingw-inline-stuff.patch | 20 +++++--- mingw-w64-python-numpy/PKGBUILD | 24 +++++----- 11 files changed, 96 insertions(+), 73 deletions(-) diff --git a/mingw-w64-python-numpy/0001-detect-mingw-environment.patch b/mingw-w64-python-numpy/0001-detect-mingw-environment.patch index 047ccd7825..839099ef65 100644 --- a/mingw-w64-python-numpy/0001-detect-mingw-environment.patch +++ b/mingw-w64-python-numpy/0001-detect-mingw-environment.patch @@ -1,7 +1,8 @@ -diff -urN numpy-1.10.2.orig/numpy/distutils/misc_util.py numpy-1.10.2/numpy/distutils/misc_util.py ---- numpy-1.10.2.orig/numpy/distutils/misc_util.py 2016-01-04 00:38:06.433855300 +0000 -+++ numpy-1.10.2/numpy/distutils/misc_util.py 2016-01-04 00:40:27.356823400 +0000 -@@ -396,6 +396,10 @@ +diff --git a/numpy/distutils/misc_util.py b/numpy/distutils/misc_util.py +index a8e19d5..432ee8b 100644 +--- a/numpy/distutils/misc_util.py ++++ b/numpy/distutils/misc_util.py +@@ -392,6 +392,10 @@ def mingw32(): return True if os.environ.get('MSYSTEM', '')=='MINGW32': return True @@ -11,4 +12,4 @@ diff -urN numpy-1.10.2.orig/numpy/distutils/misc_util.py numpy-1.10.2/numpy/dist + return True return False - def msvc_runtime_library(): + def msvc_runtime_version(): diff --git a/mingw-w64-python-numpy/0002-fix-finding-python2.patch b/mingw-w64-python-numpy/0002-fix-finding-python2.patch index ca8dd88f3a..bef944f97b 100644 --- a/mingw-w64-python-numpy/0002-fix-finding-python2.patch +++ b/mingw-w64-python-numpy/0002-fix-finding-python2.patch @@ -1,18 +1,29 @@ -diff -urN numpy-1.13.0.orig/numpy/distutils/mingw32ccompiler.py numpy-1.13.0/numpy/distutils/mingw32ccompiler.py ---- numpy-1.13.0.orig/numpy/distutils/mingw32ccompiler.py 2015-11-12 20:04:51.000000000 +0000 -+++ numpy-1.13.0/numpy/distutils/mingw32ccompiler.py 2016-01-02 03:35:27.818684200 +0000 -@@ -97,22 +97,24 @@ +diff --git a/numpy/distutils/fcompiler/gnu.py b/numpy/distutils/fcompiler/gnu.py +index 68d1501..2ffbfa7 100644 +--- a/numpy/distutils/fcompiler/gnu.py ++++ b/numpy/distutils/fcompiler/gnu.py +@@ -98,7 +98,7 @@ class GnuFCompiler(FCompiler): + pic_flags = ['-fPIC'] + + # use -mno-cygwin for g77 when Python is not Cygwin-Python +- if sys.platform == 'win32': ++ if sys.platform == 'win32' and not 'GCC' in sys.version: + for key in ['version_cmd', 'compiler_f77', 'linker_so', 'linker_exe']: + executables[key].append('-mno-cygwin') + +diff --git a/numpy/distutils/mingw32ccompiler.py b/numpy/distutils/mingw32ccompiler.py +index 3358695..bbcaf48 100644 +--- a/numpy/distutils/mingw32ccompiler.py ++++ b/numpy/distutils/mingw32ccompiler.py +@@ -91,22 +91,24 @@ class Mingw32CCompiler(distutils.cygwinccompiler.CygwinCCompiler): elif self.linker_dll == 'gcc': self.linker = 'g++' - # **changes: eric jones 4/11/01 - # 1. Check for import library on Windows. Build if it doesn't exist. -+ if not 'GCC' in sys.version: - +- - build_import_library() -+ # **changes: eric jones 4/11/01 -+ # 1. Check for import library on Windows. Build if it doesn't exist. - +- - # Check for custom msvc runtime library on Windows. Build if it doesn't exist. - msvcr_success = build_msvcr_library() - msvcr_dbg_success = build_msvcr_library(debug=True) @@ -24,6 +35,11 @@ diff -urN numpy-1.13.0.orig/numpy/distutils/mingw32ccompiler.py numpy-1.13.0/num - msvcr_version = msvc_runtime_version() - if msvcr_version: - self.define_macro('__MSVCRT_VERSION__', '0x%04i' % msvcr_version) ++ if not 'GCC' in sys.version: ++ ++ # **changes: eric jones 4/11/01 ++ # 1. Check for import library on Windows. Build if it doesn't exist. ++ + build_import_library() + + # Check for custom msvc runtime library on Windows. Build if it doesn't exist. @@ -40,15 +56,3 @@ diff -urN numpy-1.13.0.orig/numpy/distutils/mingw32ccompiler.py numpy-1.13.0/num # MS_WIN64 should be defined when building for amd64 on windows, # but python headers define it only for MS compilers, which has all -diff -urN numpy-1.10.2.orig/numpy/distutils/fcompiler/gnu.py numpy-1.10.2/numpy/distutils/fcompiler/gnu.py ---- numpy-1.10.2.orig/numpy/distutils/fcompiler/gnu.py 2015-11-12 20:04:51.000000000 +0000 -+++ numpy-1.10.2/numpy/distutils/fcompiler/gnu.py 2016-01-02 03:36:30.528498700 +0000 -@@ -108,7 +108,7 @@ - pic_flags = ['-fPIC'] - - # use -mno-cygwin for g77 when Python is not Cygwin-Python -- if sys.platform == 'win32': -+ if sys.platform == 'win32' and not 'GCC' in sys.version: - for key in ['version_cmd', 'compiler_f77', 'linker_so', 'linker_exe']: - executables[key].append('-mno-cygwin') - diff --git a/mingw-w64-python-numpy/0003-gfortran-better-version-check.patch b/mingw-w64-python-numpy/0003-gfortran-better-version-check.patch index 45777e6b15..89fdb7cd00 100644 --- a/mingw-w64-python-numpy/0003-gfortran-better-version-check.patch +++ b/mingw-w64-python-numpy/0003-gfortran-better-version-check.patch @@ -1,6 +1,8 @@ ---- numpy-1.10.2/numpy/distutils/fcompiler/gnu.py.orig 2014-08-28 15:49:10.742000000 +0400 -+++ numpy-1.10.2/numpy/distutils/fcompiler/gnu.py 2014-08-28 15:50:44.903600000 +0400 -@@ -63,7 +63,7 @@ +diff --git a/numpy/distutils/fcompiler/gnu.py b/numpy/distutils/fcompiler/gnu.py +index 68d1501..fa1de44 100644 +--- a/numpy/distutils/fcompiler/gnu.py ++++ b/numpy/distutils/fcompiler/gnu.py +@@ -53,7 +53,7 @@ class GnuFCompiler(FCompiler): return ('gfortran', m.group(1)) else: # Output probably from --version, try harder: diff --git a/mingw-w64-python-numpy/0004-fix-testsuite.patch b/mingw-w64-python-numpy/0004-fix-testsuite.patch index 7bcdad5af0..c45205667a 100644 --- a/mingw-w64-python-numpy/0004-fix-testsuite.patch +++ b/mingw-w64-python-numpy/0004-fix-testsuite.patch @@ -1,6 +1,8 @@ ---- numpy-1.9.0/numpy/core/tests/test_multiarray.py.orig 2014-09-07 10:57:48.000000000 +0200 -+++ numpy-1.9.0/numpy/core/tests/test_multiarray.py 2014-09-22 20:42:55.177362800 +0200 -@@ -4708,7 +4708,7 @@ +diff --git a/numpy/core/tests/test_multiarray.py b/numpy/core/tests/test_multiarray.py +index bd8c51a..47ac291 100644 +--- a/numpy/core/tests/test_multiarray.py ++++ b/numpy/core/tests/test_multiarray.py +@@ -5042,7 +5042,7 @@ class TestIO: """Test workarounds for 32-bit limited fwrite, fseek, and ftell calls in windows. These normally would hang doing something like this. See http://projects.scipy.org/numpy/ticket/1660""" diff --git a/mingw-w64-python-numpy/0005-mincoming-stack-boundary-32bit-optimized-64bit.patch b/mingw-w64-python-numpy/0005-mincoming-stack-boundary-32bit-optimized-64bit.patch index 5def1f1cb1..dc44c1cad0 100644 --- a/mingw-w64-python-numpy/0005-mincoming-stack-boundary-32bit-optimized-64bit.patch +++ b/mingw-w64-python-numpy/0005-mincoming-stack-boundary-32bit-optimized-64bit.patch @@ -1,7 +1,8 @@ -diff -urN numpy-1.10.2.orig/numpy/distutils/mingw32ccompiler.py numpy-1.10.2/numpy/distutils/mingw32ccompiler.py ---- numpy-1.10.2.orig/numpy/distutils/mingw32ccompiler.py 2016-01-02 03:57:55.666397000 +0000 -+++ numpy-1.10.2/numpy/distutils/mingw32ccompiler.py 2016-01-02 03:54:51.695638100 +0000 -@@ -131,10 +131,12 @@ +diff --git a/numpy/distutils/mingw32ccompiler.py b/numpy/distutils/mingw32ccompiler.py +index 3358695..553f5b3 100644 +--- a/numpy/distutils/mingw32ccompiler.py ++++ b/numpy/distutils/mingw32ccompiler.py +@@ -123,10 +123,12 @@ class Mingw32CCompiler(distutils.cygwinccompiler.CygwinCCompiler): else: # gcc-4 series releases do not support -mno-cygwin option self.set_executables( @@ -18,7 +19,7 @@ diff -urN numpy-1.10.2.orig/numpy/distutils/mingw32ccompiler.py numpy-1.10.2/num else: if self.gcc_version <= "3.0.0": self.set_executables( -@@ -155,10 +155,16 @@ +@@ -145,10 +147,16 @@ class Mingw32CCompiler(distutils.cygwinccompiler.CygwinCCompiler): linker_so='g++ -mno-cygwin -shared') else: # gcc-4 series releases do not support -mno-cygwin option diff --git a/mingw-w64-python-numpy/0006-disable-visualcompaq-for-mingw.patch b/mingw-w64-python-numpy/0006-disable-visualcompaq-for-mingw.patch index b025183b3c..fb8dba7d4d 100644 --- a/mingw-w64-python-numpy/0006-disable-visualcompaq-for-mingw.patch +++ b/mingw-w64-python-numpy/0006-disable-visualcompaq-for-mingw.patch @@ -1,7 +1,8 @@ -diff -urN numpy-1.10.2.orig/numpy/distutils/fcompiler/compaq.py numpy-1.10.2/numpy/distutils/fcompiler/compaq.py ---- numpy-1.10.2.orig/numpy/distutils/fcompiler/compaq.py 2016-01-04 00:44:11.333672900 +0000 -+++ numpy-1.10.2/numpy/distutils/fcompiler/compaq.py 2016-01-04 00:46:47.573905500 +0000 -@@ -10,7 +10,7 @@ +diff --git a/numpy/distutils/fcompiler/compaq.py b/numpy/distutils/fcompiler/compaq.py +index 6ce590c..5b4262d 100644 +--- a/numpy/distutils/fcompiler/compaq.py ++++ b/numpy/distutils/fcompiler/compaq.py +@@ -7,7 +7,7 @@ from numpy.distutils.fcompiler import FCompiler from distutils.errors import DistutilsPlatformError compilers = ['CompaqFCompiler'] @@ -10,7 +11,7 @@ diff -urN numpy-1.10.2.orig/numpy/distutils/fcompiler/compaq.py numpy-1.10.2/num # Otherwise we'd get a false positive on posix systems with # case-insensitive filesystems (like darwin), because we'll pick # up /bin/df -@@ -70,7 +70,7 @@ +@@ -70,7 +70,7 @@ class CompaqVisualFCompiler(FCompiler): ar_exe = 'lib.exe' fc_exe = 'DF' @@ -18,4 +19,4 @@ diff -urN numpy-1.10.2.orig/numpy/distutils/fcompiler/compaq.py numpy-1.10.2/num + if sys.platform=='win32' and not 'GCC' in sys.version: from numpy.distutils.msvccompiler import MSVCCompiler - try: \ No newline at end of file + try: diff --git a/mingw-w64-python-numpy/0007-disable-64bit-experimental-warning.patch b/mingw-w64-python-numpy/0007-disable-64bit-experimental-warning.patch index 44e891b040..503111009b 100644 --- a/mingw-w64-python-numpy/0007-disable-64bit-experimental-warning.patch +++ b/mingw-w64-python-numpy/0007-disable-64bit-experimental-warning.patch @@ -1,10 +1,11 @@ -diff -urN numpy-1.10.2.orig/numpy/core/src/multiarray/multiarraymodule.c numpy-1.10.2/numpy/core/src/multiarray/multiarraymodule.c ---- numpy-1.10.2.orig/numpy/core/src/multiarray/multiarraymodule.c 2015-11-12 13:04:51.000000000 -0700 -+++ numpy-1.10.2/numpy/core/src/multiarray/multiarraymodule.c 2016-03-30 06:20:16.617824700 -0700 -@@ -4556,15 +4556,6 @@ +diff --git a/numpy/core/src/multiarray/multiarraymodule.c b/numpy/core/src/multiarray/multiarraymodule.c +index cc747d8..bde15cb 100644 +--- a/numpy/core/src/multiarray/multiarraymodule.c ++++ b/numpy/core/src/multiarray/multiarraymodule.c +@@ -4482,15 +4482,6 @@ PyMODINIT_FUNC PyInit__multiarray_umath(void) { goto err; } - + -#if defined(MS_WIN64) && defined(__GNUC__) - PyErr_WarnEx(PyExc_Warning, - "Numpy built with MINGW-W64 on Windows 64 bits is experimental, " \ @@ -16,3 +17,4 @@ diff -urN numpy-1.10.2.orig/numpy/core/src/multiarray/multiarraymodule.c numpy-1 - /* Initialize access to the PyDateTime API */ numpy_pydatetime_import(); + diff --git a/mingw-w64-python-numpy/0008-mingw-gcc-doesnt-support-visibility.patch b/mingw-w64-python-numpy/0008-mingw-gcc-doesnt-support-visibility.patch index abda77bd10..9430e7d034 100644 --- a/mingw-w64-python-numpy/0008-mingw-gcc-doesnt-support-visibility.patch +++ b/mingw-w64-python-numpy/0008-mingw-gcc-doesnt-support-visibility.patch @@ -1,6 +1,8 @@ ---- numpy-1.17.0/numpy/core/setup.py.orig 2019-08-03 12:29:51.332524800 +0300 -+++ numpy-1.17.0/numpy/core/setup.py 2019-08-03 12:31:17.294441500 +0300 -@@ -387,7 +387,7 @@ +diff --git a/numpy/core/setup.py b/numpy/core/setup.py +index 2ec5e1a..25e03b8 100644 +--- a/numpy/core/setup.py ++++ b/numpy/core/setup.py +@@ -395,7 +395,7 @@ def visibility_define(config): """Return the define value to use for NPY_VISIBILITY_HIDDEN (may be empty string).""" hide = '__attribute__((visibility("hidden")))' diff --git a/mingw-w64-python-numpy/0009-disable-old-mingw-stuff.patch b/mingw-w64-python-numpy/0009-disable-old-mingw-stuff.patch index 3166312d44..17cad6b5b3 100644 --- a/mingw-w64-python-numpy/0009-disable-old-mingw-stuff.patch +++ b/mingw-w64-python-numpy/0009-disable-old-mingw-stuff.patch @@ -1,6 +1,8 @@ ---- numpy-1.17.0/numpy/core/include/numpy/npy_common.h.orig 2019-08-03 12:42:33.905141400 +0300 -+++ numpy-1.17.0/numpy/core/include/numpy/npy_common.h 2019-08-03 12:43:02.271763900 +0300 -@@ -160,7 +160,7 @@ +diff --git a/numpy/core/include/numpy/npy_common.h b/numpy/core/include/numpy/npy_common.h +index 78d6d31..cc7d060 100644 +--- a/numpy/core/include/numpy/npy_common.h ++++ b/numpy/core/include/numpy/npy_common.h +@@ -179,7 +179,7 @@ #include /* mingw based on 3.4.5 has lseek but not ftell/fseek */ diff --git a/mingw-w64-python-numpy/0010-mingw-inline-stuff.patch b/mingw-w64-python-numpy/0010-mingw-inline-stuff.patch index 5b4adb7544..cc333cb608 100644 --- a/mingw-w64-python-numpy/0010-mingw-inline-stuff.patch +++ b/mingw-w64-python-numpy/0010-mingw-inline-stuff.patch @@ -1,5 +1,7 @@ ---- a/numpy/random/src/mt19937/mt19937.h 2019-09-19 14:43:38.757883000 +0200 -+++ b/numpy/random/src/mt19937/mt19937.h 2019-09-19 14:43:08.257910100 +0200 +diff --git a/numpy/random/src/mt19937/mt19937.h b/numpy/random/src/mt19937/mt19937.h +index 1b39e0b..8312933 100644 +--- a/numpy/random/src/mt19937/mt19937.h ++++ b/numpy/random/src/mt19937/mt19937.h @@ -2,7 +2,7 @@ #include #include @@ -9,8 +11,10 @@ #define inline __forceinline #endif ---- a/numpy/random/src/pcg64/pcg64.h 2019-09-19 14:43:38.757883000 +0200 -+++ b/numpy/random/src/pcg64/pcg64.h 2019-09-19 14:43:08.257910100 +0200 +diff --git a/numpy/random/src/pcg64/pcg64.h b/numpy/random/src/pcg64/pcg64.h +index 2a7217d..1c607f5 100644 +--- a/numpy/random/src/pcg64/pcg64.h ++++ b/numpy/random/src/pcg64/pcg64.h @@ -52,7 +52,7 @@ #include @@ -20,9 +24,11 @@ #include #define inline __forceinline #endif ---- a/numpy/random/src/philox/philox.h 2019-09-19 21:22:05.822734300 +0200 -+++ b/numpy/random/src/philox/philox.h 2019-09-06 01:59:07.000000000 +0200 -@@ -33,7 +33,7 @@ +diff --git a/numpy/random/src/philox/philox.h b/numpy/random/src/philox/philox.h +index c72424a..8e7b0ff 100644 +--- a/numpy/random/src/philox/philox.h ++++ b/numpy/random/src/philox/philox.h +@@ -33,7 +33,7 @@ static NPY_INLINE uint64_t mulhilo64(uint64_t a, uint64_t b, uint64_t *hip) { return (uint64_t)product; } #else diff --git a/mingw-w64-python-numpy/PKGBUILD b/mingw-w64-python-numpy/PKGBUILD index f28e41132e..e92da7be5b 100644 --- a/mingw-w64-python-numpy/PKGBUILD +++ b/mingw-w64-python-numpy/PKGBUILD @@ -8,7 +8,7 @@ pkgname=("${MINGW_PACKAGE_PREFIX}-python-${_realname}") provides=("${MINGW_PACKAGE_PREFIX}-python3-${_realname}") conflicts=("${MINGW_PACKAGE_PREFIX}-python3-${_realname}") replaces=("${MINGW_PACKAGE_PREFIX}-python3-${_realname}") -pkgver=1.20.0 +pkgver=1.20.1 pkgrel=1 pkgdesc="Scientific tools for Python (mingw-w64)" arch=('any') @@ -34,17 +34,17 @@ source=(https://github.com/numpy/numpy/releases/download/v${pkgver}/${_realname} 0008-mingw-gcc-doesnt-support-visibility.patch 0009-disable-old-mingw-stuff.patch 0010-mingw-inline-stuff.patch) -sha256sums=('67b630745a71b541ff6517d6f3d62b00690dc8ba0684cad0d7b0ac55aec1de53' - '173e9020eb88a9b281180024ad0f137f86f893e2099693693e42a5bf5944381a' - '140c23c214cae880833380e8479e4ce45c8439b22b1432d73ff0cc2cd58da886' - '3b640625b56b158465d6628f75fadce90af8825259d04af1b1af09fef53a720c' - '720fbba58ac6a73e9476266d033ada9bdc809ec5a6c3cd518fc2f1efec34c3f9' - '3cc0176440f4f474612cb3c28b94d0846b74b508631b399aec0a5c0943c4cf1a' - '7f1a924c1c58853611cac935de583fb2ced20c57bff09ef933927cc5cbc4bef9' - 'c1114a027fc797bb6c5c6f7b3044fa853b9e9263555088b4b2b12bdb77baefd5' - '9204922151a7459ed0ecb5d7379fc16bdee6b8c74c925c575667b0ac6ff6441a' - 'a089bb11db5110903dba987c2ffb0ab9468414c5828bdc18809b1baeebe61b92' - 'c95b2702467055f2f0ff68fe6ba339999d4843ad1c0b8401be16a775e1ffc170') +sha256sums=('9bf51d69ebb4ca9239e55bedc2185fe2c0ec222da0adee7ece4125414676846d' + '94f111ab238c4a82e8613ed14e4cbeb553eabff26523f576e5fcafdbfdc8ee29' + '3aacb1d92e7764c9f0f24afa1a97b136a069fcd81d63c9fa55565c40c5a29974' + '2679482ce9396b551e1e1e7674f373d139b3e8a2f9729026000dd3c581de41d7' + 'a9023ca3ba0d4b444ef490ca9fa145896d24f34bb271676adf538d5da7546725' + 'd2d7b83114e87f45656d9523f5536511bf16d5a54a4f3bfa852c5631651019f5' + 'fcacffaae853de592224bc51f1ecb3e617f2fc518d05373e1310aeabdf097254' + 'cafc924fd11d8653a49970d0cce5b31869cce0e8996a3ae57bcbccca96bc8eb3' + 'c7222c3cd85ff6af515514c5c3b8f3c02144c58c1373dec16683fa455504aa69' + '22ca44e7f5d01b2bcb805251f5964026e92c55400d4c17055e10268bdc93849e' + 'ffa3eb1b65ffeb1aece369e2e3e56092013c0a0b64c67e6166cece622e526ff3') prepare() { cd ${_realname}-${pkgver}