numpy: update to 1.22.4

This commit is contained in:
Mehdi Chinoune
2021-12-20 07:41:36 +01:00
committed by Biswapriyo Nath
parent 40ff521fc6
commit 7ffcd8f7ff
3 changed files with 8 additions and 160 deletions

View File

@@ -1,13 +0,0 @@
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 <io.h>
/* mingw based on 3.4.5 has lseek but not ftell/fseek */
-#if defined(__MINGW32__) || defined(__MINGW64__)
+#if defined(__MINGW32__) && !defined(__MINGW64_VERSION_MAJOR)
extern int __cdecl _fseeki64(FILE *, long long, int);
extern long long __cdecl _ftelli64(FILE *);
#endif

View File

@@ -1,130 +0,0 @@
From 7e03a56194a9def4296ef502bb380d8cc4a2d061 Mon Sep 17 00:00:00 2001
From: Christoph Reiter <reiter.christoph@gmail.com>
Date: Tue, 9 Nov 2021 19:18:52 +0100
Subject: [PATCH] DEP: remove code for supporting GCC <4 in Mingw32CCompiler
The last GCC 3.x release before 4.0 was 3.4 which was released 2004,
so 17 years ago.
Removes all code only used with those old toolchains.
---
numpy/distutils/mingw32ccompiler.py | 81 +++++------------------------
1 file changed, 12 insertions(+), 69 deletions(-)
diff --git a/numpy/distutils/mingw32ccompiler.py b/numpy/distutils/mingw32ccompiler.py
index 82d296434..fbe3655c9 100644
--- a/numpy/distutils/mingw32ccompiler.py
+++ b/numpy/distutils/mingw32ccompiler.py
@@ -24,7 +24,6 @@
# 3. Force windows to use g77
import distutils.cygwinccompiler
-from distutils.version import StrictVersion
from distutils.unixccompiler import UnixCCompiler
from distutils.msvccompiler import get_build_version as get_build_msvc_version
from distutils.errors import UnknownFileError
@@ -62,35 +61,6 @@ def __init__ (self,
distutils.cygwinccompiler.CygwinCCompiler.__init__ (self, verbose,
dry_run, force)
- # we need to support 3.2 which doesn't match the standard
- # get_versions methods regex
- if self.gcc_version is None:
- try:
- out_string = subprocess.check_output(['gcc', '-dumpversion'])
- except (OSError, CalledProcessError):
- out_string = "" # ignore failures to match old behavior
- result = re.search(r'(\d+\.\d+)', out_string)
- if result:
- self.gcc_version = StrictVersion(result.group(1))
-
- # A real mingw32 doesn't need to specify a different entry point,
- # but cygwin 2.91.57 in no-cygwin-mode needs it.
- if self.gcc_version <= "2.91.57":
- entry_point = '--entry _DllMain@12'
- else:
- entry_point = ''
-
- if self.linker_dll == 'dllwrap':
- # Commented out '--driver-name g++' part that fixes weird
- # g++.exe: g++: No such file or directory
- # error (mingw 1.0 in Enthon24 tree, gcc-3.4.5).
- # If the --driver-name part is required for some environment
- # then make the inclusion of this part specific to that
- # environment.
- self.linker = 'dllwrap' # --driver-name g++'
- 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.
@@ -113,42 +83,18 @@ def __init__ (self,
# kind of bad consequences, like using Py_ModuleInit4 instead of
# Py_ModuleInit4_64, etc... So we add it here
if get_build_architecture() == 'AMD64':
- if self.gcc_version < "4.0":
- self.set_executables(
- compiler='gcc -g -DDEBUG -DMS_WIN64 -mno-cygwin -O0 -Wall',
- compiler_so='gcc -g -DDEBUG -DMS_WIN64 -mno-cygwin -O0'
- ' -Wall -Wstrict-prototypes',
- linker_exe='gcc -g -mno-cygwin',
- linker_so='gcc -g -mno-cygwin -shared')
- else:
- # gcc-4 series releases do not support -mno-cygwin option
- self.set_executables(
- compiler='gcc -g -DDEBUG -DMS_WIN64 -O0 -Wall',
- compiler_so='gcc -g -DDEBUG -DMS_WIN64 -O0 -Wall -Wstrict-prototypes',
- linker_exe='gcc -g',
- linker_so='gcc -g -shared')
+ self.set_executables(
+ compiler='gcc -g -DDEBUG -DMS_WIN64 -O0 -Wall',
+ compiler_so='gcc -g -DDEBUG -DMS_WIN64 -O0 -Wall '
+ '-Wstrict-prototypes',
+ linker_exe='gcc -g',
+ linker_so='gcc -g -shared')
else:
- if self.gcc_version <= "3.0.0":
- self.set_executables(
- compiler='gcc -mno-cygwin -O2 -w',
- compiler_so='gcc -mno-cygwin -mdll -O2 -w'
- ' -Wstrict-prototypes',
- linker_exe='g++ -mno-cygwin',
- linker_so='%s -mno-cygwin -mdll -static %s' %
- (self.linker, entry_point))
- elif self.gcc_version < "4.0":
- self.set_executables(
- compiler='gcc -mno-cygwin -O2 -Wall',
- compiler_so='gcc -mno-cygwin -O2 -Wall'
- ' -Wstrict-prototypes',
- linker_exe='g++ -mno-cygwin',
- linker_so='g++ -mno-cygwin -shared')
- else:
- # gcc-4 series releases do not support -mno-cygwin option
- self.set_executables(compiler='gcc -O2 -Wall',
- compiler_so='gcc -O2 -Wall -Wstrict-prototypes',
- linker_exe='g++ ',
- linker_so='g++ -shared')
+ self.set_executables(
+ compiler='gcc -O2 -Wall',
+ compiler_so='gcc -O2 -Wall -Wstrict-prototypes',
+ linker_exe='g++ ',
+ linker_so='g++ -shared')
# added for python2.3 support
# we can't pass it through set_executables because pre 2.2 would fail
self.compiler_cxx = ['g++']
@@ -198,10 +144,7 @@ def link(self,
extra_postargs,
build_temp,
target_lang)
- if self.gcc_version < "3.0.0":
- func = distutils.cygwinccompiler.CygwinCCompiler.link
- else:
- func = UnixCCompiler.link
+ func = UnixCCompiler.link
func(*args[:func.__code__.co_argcount])
return
--
2.33.0

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.21.5
pkgver=1.22.4
pkgrel=1
pkgdesc="Scientific tools for Python (mingw-w64)"
arch=('any')
@@ -22,9 +22,7 @@ makedepends=("${MINGW_PACKAGE_PREFIX}-cython"
$( [[ ${MINGW_PACKAGE_PREFIX} == *-clang-* ]] || \
echo "${MINGW_PACKAGE_PREFIX}-gcc-fortran"))
depends=("${MINGW_PACKAGE_PREFIX}-python"
$( [[ ${MSYSTEM} == "CLANG32" ]] || \
[[ ${MSYSTEM} == "CLANGARM64" ]] || \
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
@@ -36,12 +34,10 @@ 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
0009-disable-old-mingw-stuff.patch
0010-mingw-inline-stuff.patch
0011-dont-die-if-no-fcompiler.patch
0012-clang-no-gcc-workaround.patch
1001-DEP-remove-code-for-supporting-GCC-4-in-Mingw32CComp.patch)
sha256sums=('1a7ee0ffb35dc7489aebe5185a483f4c43b0d2cf784c3c9940f975a7dde56506'
0012-clang-no-gcc-workaround.patch)
sha256sums=('b4308198d0e41efaa108e57d69973398439c7299a9d551680cdd603cf6d20709'
'94f111ab238c4a82e8613ed14e4cbeb553eabff26523f576e5fcafdbfdc8ee29'
'3aacb1d92e7764c9f0f24afa1a97b136a069fcd81d63c9fa55565c40c5a29974'
'2679482ce9396b551e1e1e7674f373d139b3e8a2f9729026000dd3c581de41d7'
@@ -50,12 +46,9 @@ sha256sums=('1a7ee0ffb35dc7489aebe5185a483f4c43b0d2cf784c3c9940f975a7dde56506'
'fcacffaae853de592224bc51f1ecb3e617f2fc518d05373e1310aeabdf097254'
'cafc924fd11d8653a49970d0cce5b31869cce0e8996a3ae57bcbccca96bc8eb3'
'c7222c3cd85ff6af515514c5c3b8f3c02144c58c1373dec16683fa455504aa69'
'22ca44e7f5d01b2bcb805251f5964026e92c55400d4c17055e10268bdc93849e'
'ae47d0c8adbae798ca1675ae9c0a35146bad00c6b5734f713cd76c01832e5436'
'87bdd0a47a8662bdb8acaca18452901ee1f42cf08b985443ffb214f7facfdb2d'
'86eceee1ec86934d416c52fe8197c09c644b9f27ab93454a849e065b1ddac12f'
'6c4e44409e4611f7ddece6af7bb45bb31316ea031dca8a8794c3f1237f950db7')
'86eceee1ec86934d416c52fe8197c09c644b9f27ab93454a849e065b1ddac12f')
# Helper macros to help make tasks easier #
apply_patch_with_msg() {
@@ -69,10 +62,6 @@ apply_patch_with_msg() {
prepare() {
cd ${_realname}-${pkgver}
# https://github.com/numpy/numpy/pull/20333
apply_patch_with_msg \
1001-DEP-remove-code-for-supporting-GCC-4-in-Mingw32CComp.patch
apply_patch_with_msg \
0001-detect-mingw-environment.patch \
0002-fix-finding-python2.patch \
@@ -81,7 +70,6 @@ prepare() {
0006-disable-visualcompaq-for-mingw.patch \
0007-disable-64bit-experimental-warning.patch \
0008-mingw-gcc-doesnt-support-visibility.patch \
0009-disable-old-mingw-stuff.patch \
0010-mingw-inline-stuff.patch \
0011-dont-die-if-no-fcompiler.patch \
0012-clang-no-gcc-workaround.patch
@@ -139,4 +127,7 @@ 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 {} \;
}