python-numpy: update to 1.24.0
This commit is contained in:
committed by
مهدي شينون (Mehdi Chinoune)
parent
44811109e9
commit
8232e36b02
@@ -1,13 +0,0 @@
|
||||
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"""
|
||||
- if sys.platform != 'win32':
|
||||
+ if sys.platform != 'win32' or "MSYSTEM" in os.environ:
|
||||
return
|
||||
try:
|
||||
# before workarounds, only up to 2**32-1 worked
|
||||
@@ -1,39 +0,0 @@
|
||||
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 <math.h>
|
||||
#include <stdint.h>
|
||||
|
||||
-#ifdef _WIN32
|
||||
+#if defined(_WIN32) && !defined (__MINGW32__)
|
||||
#define inline __forceinline
|
||||
#endif
|
||||
|
||||
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 <inttypes.h>
|
||||
|
||||
-#ifdef _WIN32
|
||||
+#if defined(_WIN32) && !defined (__MINGW32__)
|
||||
#include <stdlib.h>
|
||||
#define inline __forceinline
|
||||
#endif
|
||||
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
|
||||
-#if defined(_WIN32)
|
||||
+#if defined(_WIN32) && !defined(__MINGW32__)
|
||||
#include <intrin.h>
|
||||
#if defined(_WIN64) && defined(_M_AMD64)
|
||||
#pragma intrinsic(_umul128)
|
||||
@@ -1,5 +1,5 @@
|
||||
--- numpy-1.21.0/numpy/distutils/command/autodist.py.orig 2021-07-22 19:58:29.268697600 -0700
|
||||
+++ numpy-1.21.0/numpy/distutils/command/autodist.py 2021-07-22 19:59:01.473946900 -0700
|
||||
--- a/numpy/distutils/command/autodist.py
|
||||
+++ b/numpy/distutils/command/autodist.py
|
||||
@@ -62,6 +62,22 @@
|
||||
""")
|
||||
return cmd.try_compile(body, None, None)
|
||||
@@ -23,8 +23,8 @@
|
||||
|
||||
def check_gcc_version_at_least(cmd, major, minor=0, patchlevel=0):
|
||||
"""
|
||||
--- numpy-1.21.0/numpy/distutils/command/config.py.orig 2021-07-22 19:59:38.526117300 -0700
|
||||
+++ numpy-1.21.0/numpy/distutils/command/config.py 2021-07-22 20:01:07.256382700 -0700
|
||||
--- a/numpy/distutils/command/config.py
|
||||
+++ b/numpy/distutils/command/config.py
|
||||
@@ -23,7 +23,8 @@
|
||||
check_gcc_version_at_least,
|
||||
check_inline,
|
||||
@@ -35,7 +35,7 @@
|
||||
|
||||
LANG_EXT['f77'] = '.f'
|
||||
LANG_EXT['f90'] = '.f90'
|
||||
@@ -422,6 +423,10 @@
|
||||
@@ -421,6 +422,10 @@
|
||||
"""Return True if the C compiler is gcc"""
|
||||
return check_compiler_gcc(self)
|
||||
|
||||
@@ -46,13 +46,13 @@
|
||||
def check_gcc_function_attribute(self, attribute, name):
|
||||
return check_gcc_function_attribute(self, attribute, name)
|
||||
|
||||
--- numpy-1.21.0/numpy/core/setup.py.orig 2021-06-18 14:49:32.241745700 -0700
|
||||
+++ numpy-1.21.0/numpy/core/setup.py 2021-07-22 20:01:28.394050600 -0700
|
||||
@@ -172,6 +172,7 @@
|
||||
# support on Windows-based platforms
|
||||
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)])
|
||||
--- 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)])
|
||||
|
||||
@@ -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.23.5
|
||||
pkgver=1.24.0
|
||||
pkgrel=1
|
||||
pkgdesc="Scientific tools for Python (mingw-w64)"
|
||||
arch=('any')
|
||||
@@ -22,36 +22,29 @@ makedepends=("${MINGW_PACKAGE_PREFIX}-cython"
|
||||
$( [[ ${MINGW_PACKAGE_PREFIX} == *-clang-* ]] || \
|
||||
echo "${MINGW_PACKAGE_PREFIX}-gcc-fortran"))
|
||||
depends=("${MINGW_PACKAGE_PREFIX}-python"
|
||||
$( [[ ${MINGW_PACKAGE_PREFIX} == *-clang-aarch64* ]] || \
|
||||
echo "${MINGW_PACKAGE_PREFIX}-openblas"))
|
||||
"${MINGW_PACKAGE_PREFIX}-openblas")
|
||||
optdepends=("${MINGW_PACKAGE_PREFIX}-python-pytest: testsuite")
|
||||
#options=('!strip' 'debug')
|
||||
source=(https://github.com/numpy/numpy/releases/download/v${pkgver}/${_realname}-${pkgver}.tar.gz
|
||||
0001-detect-mingw-environment.patch
|
||||
0002-fix-finding-python2.patch
|
||||
0003-gfortran-better-version-check.patch
|
||||
0004-fix-testsuite.patch
|
||||
0005-mincoming-stack-boundary-32bit-optimized-64bit.patch
|
||||
0006-disable-visualcompaq-for-mingw.patch
|
||||
0007-disable-64bit-experimental-warning.patch
|
||||
0008-mingw-gcc-doesnt-support-visibility.patch
|
||||
0010-mingw-inline-stuff.patch
|
||||
0011-dont-die-if-no-fcompiler.patch
|
||||
0012-clang-no-gcc-workaround.patch
|
||||
https://patch-diff.githubusercontent.com/raw/numpy/numpy/pull/22242.patch)
|
||||
sha256sums=('1b1766d6f397c18153d40015ddfc79ddb715cabadc04d2d228d4e5a8bc4ded1a'
|
||||
0012-clang-no-gcc-workaround.patch)
|
||||
sha256sums=('c4ab7c9711fe6b235e86487ca74c1b092a6dd59a3cb45b63241ea0a148501853'
|
||||
'94f111ab238c4a82e8613ed14e4cbeb553eabff26523f576e5fcafdbfdc8ee29'
|
||||
'3aacb1d92e7764c9f0f24afa1a97b136a069fcd81d63c9fa55565c40c5a29974'
|
||||
'2679482ce9396b551e1e1e7674f373d139b3e8a2f9729026000dd3c581de41d7'
|
||||
'a9023ca3ba0d4b444ef490ca9fa145896d24f34bb271676adf538d5da7546725'
|
||||
'fb1a42a6eed1ea0795f9c91506623153157d4410a0f06ccb76eb80457fb6e8f5'
|
||||
'fcacffaae853de592224bc51f1ecb3e617f2fc518d05373e1310aeabdf097254'
|
||||
'cafc924fd11d8653a49970d0cce5b31869cce0e8996a3ae57bcbccca96bc8eb3'
|
||||
'c7222c3cd85ff6af515514c5c3b8f3c02144c58c1373dec16683fa455504aa69'
|
||||
'ae47d0c8adbae798ca1675ae9c0a35146bad00c6b5734f713cd76c01832e5436'
|
||||
'87bdd0a47a8662bdb8acaca18452901ee1f42cf08b985443ffb214f7facfdb2d'
|
||||
'86eceee1ec86934d416c52fe8197c09c644b9f27ab93454a849e065b1ddac12f'
|
||||
'1226aafcbc0719bb4101eec004154d6320fbf720600a5a436260f3737b20e4ca')
|
||||
'e21b48037928d797f46289439116d3585d697de2c58d51119873b47ee5410a92')
|
||||
|
||||
# Helper macros to help make tasks easier #
|
||||
apply_patch_with_msg() {
|
||||
@@ -69,11 +62,9 @@ prepare() {
|
||||
0001-detect-mingw-environment.patch \
|
||||
0002-fix-finding-python2.patch \
|
||||
0003-gfortran-better-version-check.patch \
|
||||
0004-fix-testsuite.patch \
|
||||
0006-disable-visualcompaq-for-mingw.patch \
|
||||
0007-disable-64bit-experimental-warning.patch \
|
||||
0008-mingw-gcc-doesnt-support-visibility.patch \
|
||||
0010-mingw-inline-stuff.patch \
|
||||
0011-dont-die-if-no-fcompiler.patch \
|
||||
0012-clang-no-gcc-workaround.patch
|
||||
|
||||
@@ -82,8 +73,7 @@ prepare() {
|
||||
# Note, -mincoming-stack-boundary (and the other flags set) doesn't get used except
|
||||
# in a test compilation, AFAICT.
|
||||
|
||||
# https://github.com/numpy/numpy/pull/22242
|
||||
apply_patch_with_msg 22242.patch
|
||||
find . -type f -name "*.orig" -exec rm -f {} \;
|
||||
|
||||
cd ..
|
||||
|
||||
@@ -133,7 +123,4 @@ package() {
|
||||
for _f in "${pkgdir}${MINGW_PREFIX}"/bin/*.py; do
|
||||
sed -e "s|${_mingw_prefix}/bin/|/usr/bin/env |g" -i ${_f}
|
||||
done
|
||||
|
||||
# Clean *.orig files
|
||||
find "${pkgdir}${MINGW_PREFIX}" -type f -name "*.orig" -exec rm -f {} \;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user