python-numpy: update to 1.25.0

This commit is contained in:
Mehdi Chinoune
2023-06-17 18:12:38 +00:00
committed by مهدي شينون (Mehdi Chinoune)
parent 13ad0ac29d
commit de23a92bda
3 changed files with 5 additions and 85 deletions

View File

@@ -1,58 +0,0 @@
--- a/numpy/distutils/command/autodist.py
+++ b/numpy/distutils/command/autodist.py
@@ -62,6 +62,22 @@
""")
return cmd.try_compile(body, None, None)
+def check_compiler_clang(cmd):
+ """Check if the compiler is Clang."""
+
+ cmd._check_compiler()
+ body = textwrap.dedent("""
+ int
+ main()
+ {
+ #if (! defined __clang__)
+ #error clang required
+ #endif
+ return 0;
+ }
+ """)
+ return cmd.try_compile(body, None, None)
+
def check_gcc_version_at_least(cmd, major, minor=0, patchlevel=0):
"""
--- a/numpy/distutils/command/config.py
+++ b/numpy/distutils/command/config.py
@@ -23,7 +23,8 @@
check_gcc_version_at_least,
check_inline,
check_restrict,
- check_compiler_gcc)
+ check_compiler_gcc,
+ check_compiler_clang)
LANG_EXT['f77'] = '.f'
LANG_EXT['f90'] = '.f90'
@@ -421,6 +422,10 @@
"""Return True if the C compiler is gcc"""
return check_compiler_gcc(self)
+ def check_compiler_clang(self):
+ """Return True if the C compiler is clang"""
+ return check_compiler_clang(self)
+
def check_gcc_function_attribute(self, attribute, name):
return check_gcc_function_attribute(self, attribute, name)
--- a/numpy/core/setup.py
+++ b/numpy/core/setup.py
@@ -182,6 +182,7 @@
if fn == 'attribute_target_avx512f':
if (sys.platform in ('win32', 'cygwin') and
config.check_compiler_gcc() and
+ not config.check_compiler_clang() and
not config.check_gcc_version_at_least(8, 4)):
ext.extra_compile_args.extend(
['-ffixed-xmm%s' % n for n in range(16, 32)])

View File

@@ -1,13 +0,0 @@
diff --git a/numpy/core/src/multiarray/convert.c b/numpy/core/src/multiarray/convert.c
index 9e0c9fb..57fcbd5 100644
--- a/numpy/core/src/multiarray/convert.c
+++ b/numpy/core/src/multiarray/convert.c
@@ -156,7 +156,7 @@ PyArray_ToFile(PyArrayObject *self, FILE *fp, char *sep, char *format)
size = PyArray_SIZE(self);
NPY_BEGIN_ALLOW_THREADS;
-#if defined (_MSC_VER) && defined(_WIN64)
+#if defined(_WIN64)
/* Workaround Win64 fwrite() bug. Ticket #1660 */
{
npy_intp maxsize = 2147483648 / PyArray_DESCR(self)->elsize;

View File

@@ -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.24.3
pkgver=1.25.0
pkgrel=1
pkgdesc="Scientific tools for Python (mingw-w64)"
arch=('any')
@@ -33,10 +33,8 @@ source=(https://github.com/numpy/numpy/releases/download/v${pkgver}/${_realname}
0006-disable-visualcompaq-for-mingw.patch
0007-disable-64bit-experimental-warning.patch
0008-mingw-gcc-doesnt-support-visibility.patch
0011-dont-die-if-no-fcompiler.patch
0012-clang-no-gcc-workaround.patch
0013-fix-4GiB-fwrites.patch)
sha256sums=('ab344f1bf21f140adab8e47fdbc7c35a477dc01408791f8ba00d018dd0bc5155'
0011-dont-die-if-no-fcompiler.patch)
sha256sums=('f1accae9a28dc3cda46a91de86acf69de0d1b5f4edd44a9b0c3ceb8036dfff19'
'94f111ab238c4a82e8613ed14e4cbeb553eabff26523f576e5fcafdbfdc8ee29'
'3aacb1d92e7764c9f0f24afa1a97b136a069fcd81d63c9fa55565c40c5a29974'
'2679482ce9396b551e1e1e7674f373d139b3e8a2f9729026000dd3c581de41d7'
@@ -44,9 +42,7 @@ sha256sums=('ab344f1bf21f140adab8e47fdbc7c35a477dc01408791f8ba00d018dd0bc5155'
'fcacffaae853de592224bc51f1ecb3e617f2fc518d05373e1310aeabdf097254'
'cafc924fd11d8653a49970d0cce5b31869cce0e8996a3ae57bcbccca96bc8eb3'
'c7222c3cd85ff6af515514c5c3b8f3c02144c58c1373dec16683fa455504aa69'
'87bdd0a47a8662bdb8acaca18452901ee1f42cf08b985443ffb214f7facfdb2d'
'e21b48037928d797f46289439116d3585d697de2c58d51119873b47ee5410a92'
'914376cbf9f4474fd0b49e720a57f22460329c5461f7b35edfb8b07f376e7c53')
'87bdd0a47a8662bdb8acaca18452901ee1f42cf08b985443ffb214f7facfdb2d')
# Helper macros to help make tasks easier #
apply_patch_with_msg() {
@@ -67,12 +63,7 @@ prepare() {
0006-disable-visualcompaq-for-mingw.patch \
0007-disable-64bit-experimental-warning.patch \
0008-mingw-gcc-doesnt-support-visibility.patch \
0011-dont-die-if-no-fcompiler.patch \
0012-clang-no-gcc-workaround.patch
# https://github.com/numpy/numpy/pull/23505
apply_patch_with_msg \
0013-fix-4GiB-fwrites.patch
0011-dont-die-if-no-fcompiler.patch
apply_patch_with_msg \
0005-mincoming-stack-boundary-32bit-optimized-64bit.patch