numpy, bump version, drop python3.7, add python3.10 (#7219)

This commit is contained in:
Schrijvers Luc
2022-09-18 07:05:51 +02:00
committed by GitHub
parent 1f2b516a13
commit 418c5aa012
3 changed files with 45 additions and 29 deletions

View File

@@ -11,7 +11,7 @@ COPYRIGHT="2005-2021 Travis E. Oliphant et al."
LICENSE="BSD (3-clause)"
REVISION="1"
SOURCE_URI="https://github.com/numpy/numpy/releases/download/v$portVersion/numpy-$portVersion.tar.gz"
CHECKSUM_SHA256="b7340f0628ce1823c151e3d2a2a8cba2a3ff1357fba4475a24b1816e75c21f90"
CHECKSUM_SHA256="51bf49c0cd1d52be0a240aa66f3458afc4b95d8993d2d04f0d91fa60c10af6cd"
SOURCE_DIR="numpy-$portVersion"
PATCHES="numpy-$portVersion.patchset"
@@ -44,8 +44,8 @@ BUILD_REQUIRES="
# devel:libumfpack$secondaryArchSuffix
"
PYTHON_PACKAGES=(python3 python38 python39)
PYTHON_VERSIONS=(3.7 3.8 3.9)
PYTHON_PACKAGES=(python38 python39 python310)
PYTHON_VERSIONS=(3.8 3.9 3.10)
for i in "${!PYTHON_PACKAGES[@]}"; do
pythonPackage=${PYTHON_PACKAGES[i]}
pythonVersion=${PYTHON_VERSIONS[$i]}
@@ -56,15 +56,19 @@ eval "PROVIDES_${pythonPackage}=\"\
\"; \
REQUIRES_$pythonPackage=\"\
haiku$secondaryArchSuffix\n\
numpy$secondaryArchSuffix\n\
cmd:cython$pythonVersion$secondaryArchSuffix\n\
cmd:cython$pythonVersion\n\
cmd:python$pythonVersion\
\""
if [ "$targetArchitecture" = "x86_gcc2" ]; then
eval "PROVIDES_${pythonPackage}+=\"\n\
numpy_$pythonPackage = $portVersion\
\""
fi
BUILD_REQUIRES="$BUILD_REQUIRES
setuptools_$pythonPackage
"
BUILD_PREREQUIRES="$BUILD_PREREQUIRES
cmd:cython$pythonVersion$secondaryArchSuffix
cmd:cython$pythonVersion
cmd:git
cmd:gcc$secondaryArchSuffix
cmd:gfortran$secondaryArchSuffix

View File

@@ -1,23 +0,0 @@
From ff351e2c21cd45401f8b18a89ef13ab2938f19cf Mon Sep 17 00:00:00 2001
From: begasus <begasus@gmail.com>
Date: Mon, 24 May 2021 17:46:53 +0000
Subject: Haiku doesn't define __STDC_NO_THREADS__ nor __GLIBC__
diff --git a/numpy/f2py/cfuncs.py b/numpy/f2py/cfuncs.py
index f403a66..e916c1d 100644
--- a/numpy/f2py/cfuncs.py
+++ b/numpy/f2py/cfuncs.py
@@ -552,7 +552,8 @@ cppmacros["F2PY_THREAD_LOCAL_DECL"] = """\
#elif defined(__STDC_VERSION__) \\
&& (__STDC_VERSION__ >= 201112L) \\
&& !defined(__STDC_NO_THREADS__) \\
- && (!defined(__GLIBC__) || __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 12))
+ && (!defined(__GLIBC__) || __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 12)) \\
+ && !defined(__HAIKU__)
/* __STDC_NO_THREADS__ was first defined in a maintenance release of glibc 2.12,
see https://lists.gnu.org/archive/html/commit-hurd/2012-07/msg00180.html,
so `!defined(__STDC_NO_THREADS__)` may give false positive for the existence
--
2.30.2

View File

@@ -0,0 +1,35 @@
From 1dd2496df06097bb05246b9d13595265854e6e85 Mon Sep 17 00:00:00 2001
From: begasus <begasus@gmail.com>
Date: Sat, 17 Sep 2022 15:03:47 +0200
Subject: numpy, fix build for scipy
diff --git a/numpy/core/include/numpy/npy_os.h b/numpy/core/include/numpy/npy_os.h
index 6d335f7..57740d3 100644
--- a/numpy/core/include/numpy/npy_os.h
+++ b/numpy/core/include/numpy/npy_os.h
@@ -27,6 +27,8 @@
#define NPY_OS_MINGW
#elif defined(__APPLE__)
#define NPY_OS_DARWIN
+#elif defined(__HAIKU__)
+ #define NPY_OS_HAIKU
#else
#define NPY_OS_UNKNOWN
#endif
diff --git a/numpy/f2py/cfuncs.py b/numpy/f2py/cfuncs.py
index 408587d..4a8aa0e 100644
--- a/numpy/f2py/cfuncs.py
+++ b/numpy/f2py/cfuncs.py
@@ -578,7 +578,7 @@ cppmacros["F2PY_THREAD_LOCAL_DECL"] = """\
&& (__STDC_VERSION__ >= 201112L) \\
&& !defined(__STDC_NO_THREADS__) \\
&& (!defined(__GLIBC__) || __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 12)) \\
- && !defined(NPY_OS_OPENBSD)
+ && !defined(NPY_OS_OPENBSD) && !defined(NPY_OS_HAIKU)
/* __STDC_NO_THREADS__ was first defined in a maintenance release of glibc 2.12,
see https://lists.gnu.org/archive/html/commit-hurd/2012-07/msg00180.html,
so `!defined(__STDC_NO_THREADS__)` may give false positive for the existence
--
2.36.1