[packages/python3-numpy/DEVEL-1.22.4] - updated to 1.22.4 - added deprecated patch (disable tests code which uses deprecated distutils API

qboosh qboosh at pld-linux.org
Fri Sep 2 21:31:26 CEST 2022


commit 31d00d6826d4c60d73e737a8d8f8188654b978c9
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Fri Sep 2 21:31:21 2022 +0200

    - updated to 1.22.4
    - added deprecated patch (disable tests code which uses deprecated distutils API)

 python3-numpy-deprecated.patch | 39 +++++++++++++++++++++++++++++++++++++++
 python3-numpy.spec             | 25 +++++++++++++++++--------
 2 files changed, 56 insertions(+), 8 deletions(-)
---
diff --git a/python3-numpy.spec b/python3-numpy.spec
index 4006e77..e764ce7 100644
--- a/python3-numpy.spec
+++ b/python3-numpy.spec
@@ -6,26 +6,33 @@
 Summary:	Python 3.x numerical facilities
 Summary(pl.UTF-8):	Moduły do obliczeń numerycznych dla języka Python 3.x
 Name:		python3-%{module}
-Version:	1.22.2
-Release:	3
+Version:	1.22.4
+Release:	1
 Epoch:		1
 License:	BSD
 Group:		Libraries/Python
 #Source0Download: https://github.com/numpy/numpy/releases/
 Source0:	https://github.com/numpy/numpy/releases/download/v%{version}/%{module}-%{version}.tar.gz
-# Source0-md5:	5b506b01ef454f39272ca75de1c7f61c
+# Source0-md5:	09b3a41ea0b9bc20bd1691cf88f0b0d3
+Patch0:		%{name}-deprecated.patch
 URL:		https://github.com/numpy/numpy
 BuildRequires:	gcc-fortran
 BuildRequires:	lapack-devel >= 3.1.1-2
-BuildRequires:	python3-Cython >= 0.29.24
-BuildRequires:	python3-devel >= 1:3.6
-BuildRequires:	python3-setuptools
+BuildRequires:	python3-Cython >= 0.29.30
+BuildRequires:	python3-devel >= 1:3.8
+BuildRequires:	python3-setuptools >= 1:59.2.0
 %if %{with tests}
-BuildRequires:	python3-pytest
+%if "%{ver_lt '%{py3_ver}' '3.10'}" == "1"
+BuildRequires:	python3-cffi
+%endif
+BuildRequires:	python3-hypothesis >= 6.24.1
+#BuildRequires:	python3-mypy >= 0.940
+BuildRequires:	python3-pytest >= 6.2.5
+BuildRequires:	python3-pytz >= 2021.3
 %endif
 BuildRequires:	rpm-pythonprov
 BuildRequires:	rpmbuild(macros) >= 1.714
-Requires:	python3-libs >= 1:3.6
+Requires:	python3-libs >= 1:3.8
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
@@ -67,6 +74,7 @@ Generator interfejsów z Fortranu do Pythona 3.
 
 %prep
 %setup -q -n %{module}-%{version}
+%patch0 -p1
 
 %build
 # numpy.distutils uses CFLAGS/LDFLAGS as its own flags replacements,
@@ -77,6 +85,7 @@ LDFLAGS="%{rpmldflags} -shared"
 %py3_build
 
 %if %{with tests}
+PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
 %{__python3} runtests.py --mode=full
 %endif
 
diff --git a/python3-numpy-deprecated.patch b/python3-numpy-deprecated.patch
new file mode 100644
index 0000000..b3e827c
--- /dev/null
+++ b/python3-numpy-deprecated.patch
@@ -0,0 +1,39 @@
+--- numpy-1.22.4/numpy/random/tests/test_extending.py.orig	2022-05-20 15:46:11.022547000 +0200
++++ numpy-1.22.4/numpy/random/tests/test_extending.py	2022-09-02 21:05:39.227962995 +0200
+@@ -30,16 +30,6 @@ try:
+     from Cython.Compiler.Version import version as cython_version
+ except ImportError:
+     cython = None
+-else:
+-    from distutils.version import LooseVersion
+-    # Cython 0.29.21 is required for Python 3.9 and there are
+-    # other fixes in the 0.29 series that are needed even for earlier
+-    # Python versions.
+-    # Note: keep in sync with the one in pyproject.toml
+-    required_version = LooseVersion('0.29.21')
+-    if LooseVersion(cython_version) < required_version:
+-        # too old or wrong cython, skip the test
+-        cython = None
+ 
+ @pytest.mark.skipif(cython is None, reason="requires cython")
+ @pytest.mark.slow
+--- numpy-1.22.4/numpy/core/tests/test_cython.py.orig	2022-05-20 15:46:10.990547200 +0200
++++ numpy-1.22.4/numpy/core/tests/test_cython.py	2022-09-02 21:02:27.667878264 +0200
+@@ -12,17 +12,6 @@ try:
+     from Cython.Compiler.Version import version as cython_version
+ except ImportError:
+     cython = None
+-else:
+-    from distutils.version import LooseVersion
+-
+-    # Cython 0.29.21 is required for Python 3.9 and there are
+-    # other fixes in the 0.29 series that are needed even for earlier
+-    # Python versions.
+-    # Note: keep in sync with the one in pyproject.toml
+-    required_version = LooseVersion("0.29.21")
+-    if LooseVersion(cython_version) < required_version:
+-        # too old or wrong cython, skip the test
+-        cython = None
+ 
+ pytestmark = pytest.mark.skipif(cython is None, reason="requires cython")
+ 
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/python3-numpy.git/commitdiff/31d00d6826d4c60d73e737a8d8f8188654b978c9



More information about the pld-cvs-commit mailing list