]> git.pld-linux.org Git - packages/python3-numpy.git/commitdiff
- added deprecated patch (disable usage of deprecated distutils code)
authorJakub Bogusz <qboosh@pld-linux.org>
Sat, 3 Sep 2022 06:36:10 +0000 (08:36 +0200)
committerJakub Bogusz <qboosh@pld-linux.org>
Sat, 3 Sep 2022 06:36:10 +0000 (08:36 +0200)
python3-numpy-deprecated.patch [new file with mode: 0644]
python3-numpy.spec

diff --git a/python3-numpy-deprecated.patch b/python3-numpy-deprecated.patch
new file mode 100644 (file)
index 0000000..b3e827c
--- /dev/null
@@ -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")
index b8394acfc4437018ae0566efb7ec8b3633e1b67c..eb8a034403babe03ec49db4881543874f1d55872 100644 (file)
@@ -14,6 +14,7 @@ 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
+Patch0:                %{name}-deprecated.patch
 URL:           https://github.com/numpy/numpy
 BuildRequires: gcc-fortran
 BuildRequires: lapack-devel >= 3.1.1-2
@@ -67,6 +68,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,
This page took 0.119136 seconds and 4 git commands to generate.