Compare commits

...

60 Commits

Author SHA1 Message Date
David Abdurachmanov d66007b965
Merge remote-tracking branch 'up/main' into main-riscv64
Signed-off-by: David Abdurachmanov <davidlt@rivosinc.com>
2023-12-01 17:38:58 +02:00
Gwyn Ciesla 82c3521ddb Fix on Python 3.13 2023-11-20 11:00:42 -06:00
Miro Hrončok 8b0cbaca90 Fix FTBFS with Python 3.13.0a1+
Fixes https://bugzilla.redhat.com/show_bug.cgi?id=2247014

Co-Authored-By: Karolina Surma <ksurma@redhat.com>
2023-11-20 13:05:17 +01:00
Miro Hrončok 0cf52f243c Don't hardcode Python version in paths 2023-11-16 20:45:47 +01:00
Miro Hrončok 2d292fb79f Use %pyproject_buildrequires
Manually listing the dependencies for %pyproject_wheel is not supported.

Note that the vendored mesonpy build backend does not support generating
runtime metadata, so we use -R (no runtime requires). We could use -w instead,
but that would build the wheel too many times.

The dependency on patchelf is added for mesonpy.
When /usr/bin/patchelf does not exist, it tries to generate a dependency on
python3dist(patchelf), see the comment in pyproject.toml.
2023-11-06 18:24:32 +01:00
David Abdurachmanov a6b5096f8e
Rebuild for Python 3.12 (riscv64)
Signed-off-by: David Abdurachmanov <davidlt@rivosinc.com>
2023-11-06 10:50:30 +02:00
Yaakov Selkowitz 939d04bda8 Add pyproject-rpms-macros dependency
This dependency is added automatically only when using
%pyproject_generate_buildrequires, which is not the case here.  While
Fedora python3-devel pulls it in anyway, RHEL/ELN does not.
2023-11-05 23:36:11 -05:00
David Abdurachmanov b34bc42e34
Disable test_fp_noncontiguous
[..]
XFAIL ../../typing/tests/test_runtime.py::TestRuntimeProtocol::test_issubclass[_SupportsDType] - reason: Protocols with non-method members don't support issubclass()
XPASS ../../core/tests/test_numeric.py::TestClip::test_NaT_propagation[arr0-amin0-amax0] propagation doesn't match spec
FAILED ../../core/tests/test_umath.py::TestFPClass::test_fp_noncontiguous[f]
1 failed, 32036 passed, 1748 skipped, 1319 deselected, 33 xfailed, 1 xpassed in 1612.52s (0:26:52)
[..]

Signed-off-by: David Abdurachmanov <davidlt@rivosinc.com>
2023-10-21 15:32:43 +03:00
David Abdurachmanov 3e0d9645c6
Skip failing tests on riscv64
These are based on 1.24.1 and needs restesting later on.

Signed-off-by: David Abdurachmanov <davidlt@rivosinc.com>
2023-10-21 09:05:16 +03:00
David Abdurachmanov 19d4c30608
Merge remote-tracking branch 'up/main' into main-riscv64
Signed-off-by: David Abdurachmanov <davidlt@rivosinc.com>
2023-10-21 09:02:03 +03:00
Gwyn Ciesla 200eb18e3f 1.26.0 2023-09-26 10:43:42 -05:00
Miro Hrončok d0d0533071 Backport support for Cython 3 2023-07-31 11:48:17 +02:00
Gwyn Ciesla a367c1f829 Disable tests on i686 2023-07-19 12:39:22 -05:00
Gwyn Ciesla 4f441fcf66 1.24.4 2023-07-18 15:09:30 -05:00
Scott Talbert af3d0b491e Fix FTBFS with Python 3.12 2023-07-05 16:15:40 -04:00
Python Maint 92d66e8423 Rebuilt for Python 3.12 2023-06-16 08:19:17 +02:00
Python Maint db6cd203b9 Bootstrap for Python 3.12 2023-06-13 21:36:34 +02:00
Gwyn Ciesla 5df0cb11b0 1.24.3 2023-04-24 10:28:23 -05:00
Charalampos Stratakis 116541d007 Workaround pkg_resources deprecation warning
This leaks from setuptools: https://github.com/pypa/setuptools/issues/3761

Resolves: rhbz#2183387
2023-04-13 04:20:11 +02:00
Gwyn Ciesla 4ad487d64c migrated to SPDX license 2023-03-08 15:21:14 -06:00
Yaakov Selkowitz fcc064a276 Disable tests by default in RHEL builds 2023-02-03 03:28:44 +00:00
Pavel Šimovec f24a8785f0 Generalize documentation Source link 2023-01-27 10:54:39 +01:00
Pavel Šimovec 3e29b2e597 update to 1.24.1 2023-01-26 10:12:05 +01:00
Fedora Release Engineering a289102afa Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2023-01-19 21:53:46 +00:00
Charalampos Stratakis bf76c423c4 Update to 1.23.5 2022-12-02 12:16:39 +01:00
Miro Hrončok 7c03db8b97 Use distutils from setuptools to build the package 2022-10-21 18:53:04 +02:00
Miro Hrončok e742cd26a5 Skip more tests on i686, they are too big 2022-10-21 18:53:04 +02:00
Miro Hrončok fbe6def60a Update to 1.23.4 2022-10-21 18:23:36 +02:00
Kalev Lember b8acd8cd2b Explicitly pass prefix to setup.py install
This fixes the flatpak module build which otherwise ends up installing
into the /usr prefix (instead of /app) in F37+.
2022-10-08 23:08:05 +02:00
David Abdurachmanov d504c553ac
Skip specific riscv64 failing tests
Signed-off-by: David Abdurachmanov <davidlt@rivosinc.com>
2022-09-21 16:02:43 +03:00
David Abdurachmanov 625b4ea0db
Ignore testsuite errors on riscv64
Let's get back later to this and check with upstream.

[..]
=========================== short test summary info ============================
SKIPPED [1] ../../../../BUILDROOT/numpy-1.22.0-7.fc37.riscv64/usr/lib64/python3.11/site-packages/numpy/core/tests/test_arraymethod.py:90: Requires python 3.8
SKIPPED [1] ../../../../BUILDROOT/numpy-1.22.0-7.fc37.riscv64/usr/lib64/python3.11/site-packages/numpy/core/tests/test_cpu_features.py:60: Only for Linux and x86
SKIPPED [1] ../../../../BUILDROOT/numpy-1.22.0-7.fc37.riscv64/usr/lib64/python3.11/site-packages/numpy/core/tests/test_cpu_features.py:60: Only for Linux and Power
SKIPPED [1] ../../../../BUILDROOT/numpy-1.22.0-7.fc37.riscv64/usr/lib64/python3.11/site-packages/numpy/core/tests/test_cpu_features.py:60: Only for Linux and ARM
SKIPPED [1] ../../../../BUILDROOT/numpy-1.22.0-7.fc37.riscv64/usr/lib64/python3.11/site-packages/numpy/core/tests/test_datetime.py:1842: The pytz module is not available.
SKIPPED [1] ../../../../BUILDROOT/numpy-1.22.0-7.fc37.riscv64/usr/lib64/python3.11/site-packages/numpy/core/tests/test_deprecations.py:251: The pytz module is not available.
SKIPPED [1] ../../../../BUILDROOT/numpy-1.22.0-7.fc37.riscv64/usr/lib64/python3.11/site-packages/numpy/core/tests/test_deprecations.py:895: Needs nose
SKIPPED [1] ../../../../BUILDROOT/numpy-1.22.0-7.fc37.riscv64/usr/lib64/python3.11/site-packages/numpy/core/tests/test_deprecations.py:904: Needs nose
SKIPPED [1] ../../../../BUILDROOT/numpy-1.22.0-7.fc37.riscv64/usr/lib64/python3.11/site-packages/numpy/core/tests/test_deprecations.py:923: Needs nose
SKIPPED [1] ../../../../BUILDROOT/numpy-1.22.0-7.fc37.riscv64/usr/lib64/python3.11/site-packages/numpy/core/tests/test_deprecations.py:948: Needs nose
SKIPPED [1] ../../../../BUILDROOT/numpy-1.22.0-7.fc37.riscv64/usr/lib64/python3.11/site-packages/numpy/core/tests/test_deprecations.py:978: Needs nose
SKIPPED [1] ../../../../BUILDROOT/numpy-1.22.0-7.fc37.riscv64/usr/lib64/python3.11/site-packages/numpy/core/tests/test_deprecations.py:1006: Needs nose
SKIPPED [1] ../../../../BUILDROOT/numpy-1.22.0-7.fc37.riscv64/usr/lib64/python3.11/site-packages/numpy/core/tests/test_deprecations.py:1039: Needs nose
SKIPPED [1] ../../../../BUILDROOT/numpy-1.22.0-7.fc37.riscv64/usr/lib64/python3.11/site-packages/numpy/core/tests/test_deprecations.py:1073: Needs nose
SKIPPED [4] ../../../../BUILDROOT/numpy-1.22.0-7.fc37.riscv64/usr/lib64/python3.11/site-packages/numpy/core/tests/test_dtype.py:679: unreliable due to python's behaviour
SKIPPED [1] ../../../../BUILDROOT/numpy-1.22.0-7.fc37.riscv64/usr/lib64/python3.11/site-packages/numpy/core/tests/test_dtype.py:1610: Requires python 3.8
SKIPPED [1] ../../../../BUILDROOT/numpy-1.22.0-7.fc37.riscv64/usr/lib64/python3.11/site-packages/numpy/core/tests/test_longdouble.py:278: BUG #2376
SKIPPED [1] ../../../../BUILDROOT/numpy-1.22.0-7.fc37.riscv64/usr/lib64/python3.11/site-packages/numpy/core/tests/test_longdouble.py:286: BUG #2376
SKIPPED [1] ../../../../BUILDROOT/numpy-1.22.0-7.fc37.riscv64/usr/lib64/python3.11/site-packages/numpy/core/tests/test_longdouble.py:294: array repr problem
SKIPPED [10] ../../../../BUILDROOT/numpy-1.22.0-7.fc37.riscv64/usr/lib64/python3.11/site-packages/numpy/core/tests/_locales.py:62: No French locale available
SKIPPED [1] ../../../../BUILDROOT/numpy-1.22.0-7.fc37.riscv64/usr/lib64/python3.11/site-packages/numpy/core/tests/test_multiarray.py:3962: this tests the error messages when trying toprotocol 5 although it is not available
SKIPPED [16] ../../../../BUILDROOT/numpy-1.22.0-7.fc37.riscv64/usr/lib64/python3.11/site-packages/numpy/core/tests/_locales.py:70: No French locale available
SKIPPED [3] ../../../../BUILDROOT/numpy-1.22.0-7.fc37.riscv64/usr/lib64/python3.11/site-packages/numpy/core/tests/test_scalar_methods.py:180: Requires python 3.8
SKIPPED [1] ../../../../BUILDROOT/numpy-1.22.0-7.fc37.riscv64/usr/lib64/python3.11/site-packages/numpy/core/tests/test_scalarmath.py:431: Test is PyPy only (gh-9972)
SKIPPED [270] ../../../../BUILDROOT/numpy-1.22.0-7.fc37.riscv64/usr/lib64/python3.11/site-packages/numpy/core/tests/test_simd.py: target 'baseline' isn't supported by NPYV
SKIPPED [4] ../../../../BUILDROOT/numpy-1.22.0-7.fc37.riscv64/usr/lib64/python3.11/site-packages/numpy/core/tests/test_simd.py:333: target 'baseline' isn't supported by NPYV
SKIPPED [12] ../../../../BUILDROOT/numpy-1.22.0-7.fc37.riscv64/usr/lib64/python3.11/site-packages/numpy/core/tests/test_simd_module.py:25: could not find any SIMD extension with NPYV support
SKIPPED [12] ../../../../BUILDROOT/numpy-1.22.0-7.fc37.riscv64/usr/lib64/python3.11/site-packages/numpy/core/tests/test_simd_module.py:31: could not find any SIMD extension with NPYV support
SKIPPED [1] ../../../../BUILDROOT/numpy-1.22.0-7.fc37.riscv64/usr/lib64/python3.11/site-packages/numpy/core/tests/test_simd_module.py:36: could not find any SIMD extension with NPYV support
SKIPPED [1] ../../../../BUILDROOT/numpy-1.22.0-7.fc37.riscv64/usr/lib64/python3.11/site-packages/numpy/core/tests/test_simd_module.py:48: could not find a second SIMD extension with NPYV support
SKIPPED [4] ../../../../BUILDROOT/numpy-1.22.0-7.fc37.riscv64/usr/lib64/python3.11/site-packages/numpy/core/tests/test_simd_module.py:58: could not find any SIMD extension with NPYV support
SKIPPED [4] ../../../../BUILDROOT/numpy-1.22.0-7.fc37.riscv64/usr/lib64/python3.11/site-packages/numpy/core/tests/test_simd_module.py:72: could not find any SIMD extension with NPYV support
SKIPPED [1] ../../../../BUILDROOT/numpy-1.22.0-7.fc37.riscv64/usr/lib64/python3.11/site-packages/numpy/core/tests/test_simd_module.py:86: could not find any SIMD extension with NPYV support
SKIPPED [1] ../../../../BUILDROOT/numpy-1.22.0-7.fc37.riscv64/usr/lib64/python3.11/site-packages/numpy/core/tests/test_simd_module.py:91: could not find any SIMD extension with NPYV support
SKIPPED [1] ../../../../BUILDROOT/numpy-1.22.0-7.fc37.riscv64/usr/lib64/python3.11/site-packages/numpy/core/tests/test_umath_accuracy.py:33: avoid testing inconsistent platform library implementations
SKIPPED [1] ../../../../BUILDROOT/numpy-1.22.0-7.fc37.riscv64/usr/lib64/python3.11/site-packages/numpy/core/tests/test_umath_complex.py:123: cexp(nan + 0I) is wrong on most platforms
SKIPPED [1] ../../../../BUILDROOT/numpy-1.22.0-7.fc37.riscv64/usr/lib64/python3.11/site-packages/numpy/core/tests/test_umath_complex.py:480: Complex arithmetic with signed zero fails on most platforms
SKIPPED [1] ../../../../BUILDROOT/numpy-1.22.0-7.fc37.riscv64/usr/lib64/python3.11/site-packages/numpy/distutils/tests/test_mingw32ccompiler.py:9: win32 only test
SKIPPED [15] ../../../../BUILDROOT/numpy-1.22.0-7.fc37.riscv64/usr/lib64/python3.11/site-packages/numpy/distutils/tests/test_shell_utils.py:41: Unable to run with non-native parser
SKIPPED [15] ../../../../BUILDROOT/numpy-1.22.0-7.fc37.riscv64/usr/lib64/python3.11/site-packages/numpy/distutils/tests/test_shell_utils.py:76: Not implemented
SKIPPED [14] ../../../../BUILDROOT/numpy-1.22.0-7.fc37.riscv64/usr/lib64/python3.11/site-packages/numpy/lib/tests/test_nanfunctions.py:142: `axis != None` not supported for 0d arrays
SKIPPED [14] ../../../../BUILDROOT/numpy-1.22.0-7.fc37.riscv64/usr/lib64/python3.11/site-packages/numpy/lib/tests/test_nanfunctions.py:294: `axis != None` not supported for 0d arrays
SKIPPED [14] ../../../../BUILDROOT/numpy-1.22.0-7.fc37.riscv64/usr/lib64/python3.11/site-packages/numpy/lib/tests/test_nanfunctions.py:550: `axis != None` not supported for 0d arrays
SKIPPED [14] ../../../../BUILDROOT/numpy-1.22.0-7.fc37.riscv64/usr/lib64/python3.11/site-packages/numpy/lib/tests/test_nanfunctions.py:609: `axis != None` not supported for 0d arrays
SKIPPED [14] ../../../../BUILDROOT/numpy-1.22.0-7.fc37.riscv64/usr/lib64/python3.11/site-packages/numpy/lib/tests/test_nanfunctions.py:719: `axis != None` not supported for 0d arrays
SKIPPED [14] ../../../../BUILDROOT/numpy-1.22.0-7.fc37.riscv64/usr/lib64/python3.11/site-packages/numpy/lib/tests/test_nanfunctions.py:1020: `axis != None` not supported for 0d arrays
SKIPPED [14] ../../../../BUILDROOT/numpy-1.22.0-7.fc37.riscv64/usr/lib64/python3.11/site-packages/numpy/lib/tests/test_nanfunctions.py:1127: `axis != None` not supported for 0d arrays
SKIPPED [1] ../../../../BUILDROOT/numpy-1.22.0-7.fc37.riscv64/usr/lib64/python3.11/site-packages/numpy/linalg/tests/test_linalg.py:1898: Numpy xerbla not linked in.
SKIPPED [1] ../../../../BUILDROOT/numpy-1.22.0-7.fc37.riscv64/usr/lib64/python3.11/site-packages/numpy/linalg/tests/test_linalg.py:2117: Bad memory reports lead to OOM in ci testing
SKIPPED [5] ../../../../BUILDROOT/numpy-1.22.0-7.fc37.riscv64/usr/lib64/python3.11/site-packages/numpy/random/tests/test_direct.py:292: cffi not available
SKIPPED [1] ../../../../BUILDROOT/numpy-1.22.0-7.fc37.riscv64/usr/lib64/python3.11/site-packages/numpy/random/tests/test_extending.py:88: requires numba and cffi
SKIPPED [1] ../../../../BUILDROOT/numpy-1.22.0-7.fc37.riscv64/usr/lib64/python3.11/site-packages/numpy/random/tests/test_extending.py:93: requires cffi
SKIPPED [1] ../../../../BUILDROOT/numpy-1.22.0-7.fc37.riscv64/usr/lib64/python3.11/site-packages/numpy/random/tests/test_smoke.py:132: Advance is not supported by MT19937
SKIPPED [1] ../../../../BUILDROOT/numpy-1.22.0-7.fc37.riscv64/usr/lib64/python3.11/site-packages/numpy/random/tests/test_smoke.py:132: Advance is not supported by SFC64
SKIPPED [1] ../../../../BUILDROOT/numpy-1.22.0-7.fc37.riscv64/usr/lib64/python3.11/site-packages/numpy/random/tests/test_smoke.py:149: Jump is not supported by SFC64
SKIPPED [3] ../../../../BUILDROOT/numpy-1.22.0-7.fc37.riscv64/usr/lib64/python3.11/site-packages/numpy/testing/tests/test_utils.py: The raises decorator depends on Nose
XFAIL ../../core/tests/test_array_coercion.py::TestScalarDiscovery::test_scalar_coercion[rational]
  reason: Rational to object cast is undefined currently.
XFAIL ../../core/tests/test_arrayprint.py::TestArrayRepr::test_object_subclass
  See gh-10544
XFAIL ../../core/tests/test_datetime.py::TestDateTime::test_limit_str_roundtrip[-1-W]
  gh-13197
XFAIL ../../core/tests/test_datetime.py::TestDateTime::test_limit_str_roundtrip[-1-10D]
  similar to gh-13197
XFAIL ../../core/tests/test_datetime.py::TestDateTime::test_limit_str_roundtrip[1-W]
  gh-13197
XFAIL ../../core/tests/test_datetime.py::TestDateTime::test_limit_str_roundtrip[1-10D]
  similar to gh-13197
XFAIL ../../core/tests/test_multiarray.py::TestBool::test_cast_from_unicode
  See gh-9847
XFAIL ../../core/tests/test_multiarray.py::TestBool::test_cast_from_bytes
  See gh-9847
XFAIL ../../core/tests/test_numeric.py::TestNonarrayArgs::test_dunder_round_edgecases[2147483647--1]
  Out of range of int32
XFAIL ../../core/tests/test_numeric.py::TestNonarrayArgs::test_round_py_consistency
  gh-15896
XFAIL ../../core/tests/test_numeric.py::TestClip::test_clip_scalar_nan_propagation[arr0-amin0-amax0]
  no scalar nan propagation yet
XFAIL ../../core/tests/test_numeric.py::TestClip::test_NaT_propagation[arr0-amin0-amax0]
  propagation doesn't match spec
XFAIL ../../lib/tests/test_arraypad.py::TestLinearRamp::test_object_array
XFAIL ../../lib/tests/test_function_base.py::TestDigitize::test_large_integers_decreasing
  gh-11022: np.core.multiarray._monoticity loses precision
XFAIL ../../lib/tests/test_recfunctions.py::TestJoinBy::test_same_name_different_dtypes_key
  See comment at gh-9343
XFAIL ../../linalg/tests/test_linalg.py::TestCond::test_nan
  reason: [NOTRUN] Platform/LAPACK-dependent failure, see gh-18914
XFAIL ../../linalg/tests/test_linalg.py::test_blas64_geqrf_lwork_smoketest
  Numpy not compiled with 64-bit BLAS/LAPACK
XFAIL ../../ma/tests/test_core.py::TestMaskedConstant::test_coercion_unicode
  See gh-9750
XFAIL ../../ma/tests/test_core.py::TestMaskedConstant::test_coercion_bytes
  See gh-9750
XFAIL ../../tests/test_scripts.py::test_f2py[f2py]
  Test is unreliable
XFAIL ../../tests/test_scripts.py::test_f2py[f2py3]
  Test is unreliable
XFAIL ../../tests/test_scripts.py::test_f2py[f2py3.11]
  Test is unreliable
XPASS ../../lib/tests/test_function_base.py::TestQuantile::test_correct_quantile_value See gh-19154
XPASS ../../tests/test_public_api.py::test_array_api_entry_point NumPy possibly built with `USE_DEBUG=True ./tools/travis-test.sh`, which does not expose the `array_api` entry point. See https://github.com/numpy/numpy/pull/19800
FAILED ../../core/tests/test_numeric.py::TestBoolCmp::test_float - AssertionE...
FAILED ../../core/tests/test_umath.py::TestFPClass::test_fpclass[-4] - Assert...
FAILED ../../core/tests/test_umath.py::TestFPClass::test_fpclass[-2] - Assert...
FAILED ../../core/tests/test_umath.py::TestFPClass::test_fpclass[-1] - Assert...
FAILED ../../core/tests/test_umath.py::TestFPClass::test_fpclass[1] - Asserti...
5 failed, 16529 passed, 510 skipped, 1295 deselected, 22 xfailed, 2 xpassed in 1655.77s (0:27:35)
[..]

Signed-off-by: David Abdurachmanov <davidlt@rivosinc.com>
2022-09-21 15:44:36 +03:00
Fedora Release Engineering b630888254 Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2022-07-22 00:56:18 +00:00
Miro Hrončok 1441f2b648 GenericAlias fixes for Python 3.11.0b4+ 2022-07-19 00:38:28 +02:00
Miro Hrončok aed47b48f7 Deselect 4 more tests on i686 2022-06-13 18:28:27 +02:00
Python Maint 089b901865 Rebuilt for Python 3.11 2022-06-13 17:26:59 +02:00
Tomáš Hrnčiar 87f4d04d95 Disable some tests so numpy builds with Python 3.11 2022-06-13 14:06:27 +02:00
Karolina Surma e0db7e60c0 Build numpy using Python's standard library distutils
We patch Python's distutils to exclude the standard paths from rpaths.
setuptools 60+ switches to its own copy of distutils by default,
which doesn't contain the patch and leads to the failed RPM build.
This behavior is overriden with the environment variable
SETUPTOOLS_USE_DISTUTILS=stdlib.
2022-03-10 09:17:49 +01:00
Karolina Surma fdc00013a1 Fix package build with setuptools >= 60.x 2022-03-07 09:57:21 +01:00
Elliott Sales de Andrade 6ba4762803 Skip rebuild when running tests
Instead use the build we just created.
2022-02-19 18:37:43 -05:00
Elliott Sales de Andrade 7c1e28760b Re-enable tests 2022-02-19 18:14:26 -05:00
Fedora Release Engineering bca3b09ec1 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2022-01-20 21:31:11 +00:00
Gwyn Ciesla e144ce4bc1 1.22.0 2022-01-06 13:10:47 -06:00
Gwyn Ciesla 94f8ec0a11 1.21.5 2021-12-22 14:51:10 -06:00
Gwyn Ciesla 45b83b14c9 1.21.1 2021-08-05 11:30:46 -05:00
Fedora Release Engineering 483c5c9487 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2021-07-22 16:25:30 +00:00
Python Maint 1b604a85d1 Rebuilt for Python 3.10 2021-06-03 18:46:05 +02:00
Miro Hrončok 6135a94619 xfail TestCond.test_nan unconditionally to fix FTBFS 2021-05-08 17:30:35 +02:00
Gwyn Ciesla e0999a67ad Python 3.10 fix. 2021-05-07 13:21:45 -05:00
Miro Hrončok bd487d7d25 Fix for Python 3.10.0b1+
Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1958052
2021-05-07 11:43:02 +02:00
Nikola Forró 837eabab5c Fix build requirements, hypothesis is a test dependency 2021-02-12 15:52:57 +01:00
Gwyn Ciesla c384ae4c92 1.20.1 2021-02-08 09:27:03 -06:00
Gwyn Ciesla 7706b2b2c1 Sources 2021-02-01 10:04:59 -06:00
Gwyn Ciesla d9d4c7ceaf 1.20.0 final. 2021-02-01 09:38:53 -06:00
Fedora Release Engineering 432691bcac - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2021-01-26 21:47:02 +00:00
Gwyn Ciesla a9f53565fc Fix release. 2021-01-04 11:53:06 -06:00
Gwyn Ciesla 1c6c512485 Comment out url. 2021-01-04 11:49:02 -06:00
Nikola Forró 06a1578991 Generate the main dispatcher config header into the build dir 2021-01-04 18:42:15 +01:00
Gwyn Ciesla 6479234f82 Sources. 2020-12-28 11:40:46 -06:00
Gwyn Ciesla dcf42cdb7a 1.20.0 rc2 2020-12-28 11:31:47 -06:00
Tomas Orsava 7ebadbd30e Label python3-hypothesis as a test build dependency
See INSTALL.rst.txt for confirmation
2020-12-21 20:03:40 +01:00
11 changed files with 654 additions and 169 deletions

12
.gitignore vendored
View File

@ -82,3 +82,15 @@ numpy-1.4.1.tar.gz
/numpy-html.zip
/numpy-1.19.3.tar.gz
/numpy-1.19.4.tar.gz
/numpy-1.20.0rc2.tar.gz
/numpy-1.20.0.tar.gz
/numpy-1.20.1.tar.gz
/numpy-1.21.1.tar.gz
/numpy-1.21.5.tar.gz
/numpy-1.22.0.tar.gz
/numpy-1.23.4.tar.gz
/numpy-1.23.5.tar.gz
/numpy-1.24.1.tar.gz
/numpy-1.24.3.tar.gz
/numpy-1.24.4.tar.gz
/numpy-1.26.0.tar.gz

24
24772.patch Normal file
View File

@ -0,0 +1,24 @@
From 01b83b4d4e54881f68eb6edca6fb65b133825002 Mon Sep 17 00:00:00 2001
From: Charles Bousseau <cbousseau@anaconda.com>
Date: Thu, 21 Sep 2023 15:24:07 -0400
Subject: [PATCH] align test_dispatcher s390x targets with
_umath_tests_mtargets
---
numpy/core/tests/test_cpu_dispatcher.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/numpy/core/tests/test_cpu_dispatcher.py b/numpy/core/tests/test_cpu_dispatcher.py
index 2f7eac7e8e9..41a60d5c395 100644
--- a/numpy/core/tests/test_cpu_dispatcher.py
+++ b/numpy/core/tests/test_cpu_dispatcher.py
@@ -9,7 +9,8 @@ def test_dispatcher():
targets = (
"SSE2", "SSE41", "AVX2",
"VSX", "VSX2", "VSX3",
- "NEON", "ASIMD", "ASIMDHP"
+ "NEON", "ASIMD", "ASIMDHP",
+ "VX", "VXE"
)
highest_sfx = "" # no suffix for the baseline
all_sfx = []

22
24776.patch Normal file
View File

@ -0,0 +1,22 @@
From 8f8a4a4a54d63ce7d9ed8aca024561e6820d8970 Mon Sep 17 00:00:00 2001
From: Sayed Adel <seiko@imavr.com>
Date: Fri, 22 Sep 2023 11:30:49 +0400
Subject: [PATCH] BUG: Fix SIMD f32 trunc test on s390x when baseline is none
---
numpy/core/tests/test_simd_module.py | 2 ++
1 file changed, 2 insertions(+)
diff --git a/numpy/core/tests/test_simd_module.py b/numpy/core/tests/test_simd_module.py
index 44dc58dac09..4fbaa9f3008 100644
--- a/numpy/core/tests/test_simd_module.py
+++ b/numpy/core/tests/test_simd_module.py
@@ -86,6 +86,8 @@ def test_signed_overflow(self, sfx):
assert lanes == [0] * nlanes
def test_truncate_f32(self):
+ if not npyv.simd_f32:
+ pytest.skip("F32 isn't support by the SIMD extension")
f32 = npyv.setall_f32(0.1)[0]
assert f32 != 0.1
assert round(f32, 1) == 0.1

View File

@ -0,0 +1,46 @@
From b0872b858e2e6ebc394e95c81a024dcf1573c690 Mon Sep 17 00:00:00 2001
From: Ralf Gommers <ralf.gommers@gmail.com>
Date: Mon, 19 Jun 2023 11:07:19 +0200
Subject: [PATCH] TST: skip refcount related tests on py312
Python 3.12 has immortal refcounts; the initial and final
values will be the same when accessing `sys.getrefcount` inside a
test.
Closes gh-23986
---
numpy/core/tests/test_dtype.py | 5 +++++
numpy/core/tests/test_regression.py | 4 ++++
2 files changed, 9 insertions(+)
diff --git a/numpy/core/tests/test_dtype.py b/numpy/core/tests/test_dtype.py
index 454bcfa7cc1..9c88ddb5cd7 100644
--- a/numpy/core/tests/test_dtype.py
+++ b/numpy/core/tests/test_dtype.py
@@ -755,6 +755,11 @@ def iter_struct_object_dtypes():
yield pytest.param(dt, p, 12, obj, id="<structured subarray 2>")
+@pytest.mark.skipif(
+ sys.version_info >= (3, 12),
+ reason="Python 3.12 has immortal refcounts, this test will no longer "
+ "work. See gh-23986"
+)
@pytest.mark.skipif(not HAS_REFCOUNT, reason="Python lacks refcounts")
class TestStructuredObjectRefcounting:
"""These tests cover various uses of complicated structured types which
diff --git a/numpy/core/tests/test_regression.py b/numpy/core/tests/test_regression.py
index e415ecccf9f..35763f843da 100644
--- a/numpy/core/tests/test_regression.py
+++ b/numpy/core/tests/test_regression.py
@@ -1465,6 +1465,10 @@ def test_structured_arrays_with_objects1(self):
x[x.nonzero()] = x.ravel()[:1]
assert_(x[0, 1] == x[0, 0])
+ @pytest.mark.skipif(
+ sys.version_info >= (3, 12),
+ reason="Python 3.12 has immortal refcounts, this test no longer works."
+ )
@pytest.mark.skipif(not HAS_REFCOUNT, reason="Python lacks refcounts")
def test_structured_arrays_with_objects2(self):
# Ticket #1299 second test

278
cython3.patch Normal file
View File

@ -0,0 +1,278 @@
From 60720ee4d160fc2ae8ed74f98668f486ad862cef Mon Sep 17 00:00:00 2001
From: Stefan Behnel <stefan_ml@behnel.de>
Date: Thu, 4 May 2023 09:18:16 +0200
Subject: [PATCH] Add "noexcept" markers to functions that do not raise
exceptions
---
numpy/random/_common.pxd | 40 +++++++++++++++++++--------------------
numpy/random/_common.pyx | 2 +-
numpy/random/_mt19937.pyx | 8 ++++----
numpy/random/_pcg64.pyx | 6 +++---
numpy/random/_philox.pyx | 6 +++---
numpy/random/_sfc64.pyx | 6 +++---
6 files changed, 34 insertions(+), 34 deletions(-)
diff --git a/numpy/random/_common.pxd b/numpy/random/_common.pxd
index 3eaf39d..5419d63 100644
--- a/numpy/random/_common.pxd
+++ b/numpy/random/_common.pxd
@@ -39,32 +39,32 @@ cdef extern from "include/aligned_malloc.h":
cdef void *PyArray_calloc_aligned(size_t n, size_t s)
cdef void PyArray_free_aligned(void *p)
-ctypedef void (*random_double_fill)(bitgen_t *state, np.npy_intp count, double* out) nogil
-ctypedef double (*random_double_0)(void *state) nogil
-ctypedef double (*random_double_1)(void *state, double a) nogil
-ctypedef double (*random_double_2)(void *state, double a, double b) nogil
-ctypedef double (*random_double_3)(void *state, double a, double b, double c) nogil
+ctypedef void (*random_double_fill)(bitgen_t *state, np.npy_intp count, double* out) noexcept nogil
+ctypedef double (*random_double_0)(void *state) noexcept nogil
+ctypedef double (*random_double_1)(void *state, double a) noexcept nogil
+ctypedef double (*random_double_2)(void *state, double a, double b) noexcept nogil
+ctypedef double (*random_double_3)(void *state, double a, double b, double c) noexcept nogil
-ctypedef void (*random_float_fill)(bitgen_t *state, np.npy_intp count, float* out) nogil
-ctypedef float (*random_float_0)(bitgen_t *state) nogil
-ctypedef float (*random_float_1)(bitgen_t *state, float a) nogil
+ctypedef void (*random_float_fill)(bitgen_t *state, np.npy_intp count, float* out) noexcept nogil
+ctypedef float (*random_float_0)(bitgen_t *state) noexcept nogil
+ctypedef float (*random_float_1)(bitgen_t *state, float a) noexcept nogil
-ctypedef int64_t (*random_uint_0)(void *state) nogil
-ctypedef int64_t (*random_uint_d)(void *state, double a) nogil
-ctypedef int64_t (*random_uint_dd)(void *state, double a, double b) nogil
-ctypedef int64_t (*random_uint_di)(void *state, double a, uint64_t b) nogil
-ctypedef int64_t (*random_uint_i)(void *state, int64_t a) nogil
-ctypedef int64_t (*random_uint_iii)(void *state, int64_t a, int64_t b, int64_t c) nogil
+ctypedef int64_t (*random_uint_0)(void *state) noexcept nogil
+ctypedef int64_t (*random_uint_d)(void *state, double a) noexcept nogil
+ctypedef int64_t (*random_uint_dd)(void *state, double a, double b) noexcept nogil
+ctypedef int64_t (*random_uint_di)(void *state, double a, uint64_t b) noexcept nogil
+ctypedef int64_t (*random_uint_i)(void *state, int64_t a) noexcept nogil
+ctypedef int64_t (*random_uint_iii)(void *state, int64_t a, int64_t b, int64_t c) noexcept nogil
-ctypedef uint32_t (*random_uint_0_32)(bitgen_t *state) nogil
-ctypedef uint32_t (*random_uint_1_i_32)(bitgen_t *state, uint32_t a) nogil
+ctypedef uint32_t (*random_uint_0_32)(bitgen_t *state) noexcept nogil
+ctypedef uint32_t (*random_uint_1_i_32)(bitgen_t *state, uint32_t a) noexcept nogil
-ctypedef int32_t (*random_int_2_i_32)(bitgen_t *state, int32_t a, int32_t b) nogil
-ctypedef int64_t (*random_int_2_i)(bitgen_t *state, int64_t a, int64_t b) nogil
+ctypedef int32_t (*random_int_2_i_32)(bitgen_t *state, int32_t a, int32_t b) noexcept nogil
+ctypedef int64_t (*random_int_2_i)(bitgen_t *state, int64_t a, int64_t b) noexcept nogil
-cdef double kahan_sum(double *darr, np.npy_intp n)
+cdef double kahan_sum(double *darr, np.npy_intp n) noexcept
-cdef inline double uint64_to_double(uint64_t rnd) nogil:
+cdef inline double uint64_to_double(uint64_t rnd) noexcept nogil:
return (rnd >> 11) * (1.0 / 9007199254740992.0)
cdef object double_fill(void *func, bitgen_t *state, object size, object lock, object out)
diff --git a/numpy/random/_common.pyx b/numpy/random/_common.pyx
index 7b6f693..c5e4e32 100644
--- a/numpy/random/_common.pyx
+++ b/numpy/random/_common.pyx
@@ -171,7 +171,7 @@ cdef object prepare_ctypes(bitgen_t *bitgen):
ctypes.c_void_p(<uintptr_t>bitgen))
return _ctypes
-cdef double kahan_sum(double *darr, np.npy_intp n):
+cdef double kahan_sum(double *darr, np.npy_intp n) noexcept:
"""
Parameters
----------
diff --git a/numpy/random/_mt19937.pyx b/numpy/random/_mt19937.pyx
index 5a8d52e..8b99125 100644
--- a/numpy/random/_mt19937.pyx
+++ b/numpy/random/_mt19937.pyx
@@ -28,16 +28,16 @@ cdef extern from "src/mt19937/mt19937.h":
enum:
RK_STATE_LEN
-cdef uint64_t mt19937_uint64(void *st) nogil:
+cdef uint64_t mt19937_uint64(void *st) noexcept nogil:
return mt19937_next64(<mt19937_state *> st)
-cdef uint32_t mt19937_uint32(void *st) nogil:
+cdef uint32_t mt19937_uint32(void *st) noexcept nogil:
return mt19937_next32(<mt19937_state *> st)
-cdef double mt19937_double(void *st) nogil:
+cdef double mt19937_double(void *st) noexcept nogil:
return mt19937_next_double(<mt19937_state *> st)
-cdef uint64_t mt19937_raw(void *st) nogil:
+cdef uint64_t mt19937_raw(void *st) noexcept nogil:
return <uint64_t>mt19937_next32(<mt19937_state *> st)
cdef class MT19937(BitGenerator):
diff --git a/numpy/random/_pcg64.pyx b/numpy/random/_pcg64.pyx
index c0a10a8..dee38c0 100644
--- a/numpy/random/_pcg64.pyx
+++ b/numpy/random/_pcg64.pyx
@@ -30,13 +30,13 @@ cdef extern from "src/pcg64/pcg64.h":
uint32_t pcg64_cm_next32(pcg64_state *state) nogil
void pcg64_cm_advance(pcg64_state *state, uint64_t *step)
-cdef uint64_t pcg64_uint64(void* st) nogil:
+cdef uint64_t pcg64_uint64(void* st) noexcept nogil:
return pcg64_next64(<pcg64_state *>st)
-cdef uint32_t pcg64_uint32(void *st) nogil:
+cdef uint32_t pcg64_uint32(void *st) noexcept nogil:
return pcg64_next32(<pcg64_state *> st)
-cdef double pcg64_double(void* st) nogil:
+cdef double pcg64_double(void* st) noexcept nogil:
return uint64_to_double(pcg64_next64(<pcg64_state *>st))
cdef uint64_t pcg64_cm_uint64(void* st) nogil:
diff --git a/numpy/random/_philox.pyx b/numpy/random/_philox.pyx
index d9a366e..e0c0504 100644
--- a/numpy/random/_philox.pyx
+++ b/numpy/random/_philox.pyx
@@ -42,13 +42,13 @@ cdef extern from 'src/philox/philox.h':
void philox_advance(uint64_t *step, philox_state *state)
-cdef uint64_t philox_uint64(void*st) nogil:
+cdef uint64_t philox_uint64(void*st) noexcept nogil:
return philox_next64(<philox_state *> st)
-cdef uint32_t philox_uint32(void *st) nogil:
+cdef uint32_t philox_uint32(void *st) noexcept nogil:
return philox_next32(<philox_state *> st)
-cdef double philox_double(void*st) nogil:
+cdef double philox_double(void*st) noexcept nogil:
return uint64_to_double(philox_next64(<philox_state *> st))
cdef class Philox(BitGenerator):
diff --git a/numpy/random/_sfc64.pyx b/numpy/random/_sfc64.pyx
index 1daee34..419045c 100644
--- a/numpy/random/_sfc64.pyx
+++ b/numpy/random/_sfc64.pyx
@@ -21,13 +21,13 @@ cdef extern from "src/sfc64/sfc64.h":
void sfc64_set_state(sfc64_state *state, uint64_t *state_arr, int has_uint32, uint32_t uinteger)
-cdef uint64_t sfc64_uint64(void* st) nogil:
+cdef uint64_t sfc64_uint64(void* st) noexcept nogil:
return sfc64_next64(<sfc64_state *>st)
-cdef uint32_t sfc64_uint32(void *st) nogil:
+cdef uint32_t sfc64_uint32(void *st) noexcept nogil:
return sfc64_next32(<sfc64_state *> st)
-cdef double sfc64_double(void* st) nogil:
+cdef double sfc64_double(void* st) noexcept nogil:
return uint64_to_double(sfc64_next64(<sfc64_state *>st))
--
2.40.1
From 910aff8c5827e13a7b8bb32e22604cf5e35943fc Mon Sep 17 00:00:00 2001
From: Thomas A Caswell <tcaswell@gmail.com>
Date: Sat, 13 May 2023 21:33:45 -0400
Subject: [PATCH] MNT: compatibility with cython3
This is fallout from https://github.com/cython/cython/pull/5386
---
numpy/random/_pcg64.pyx | 11 +++++------
numpy/random/_philox.pyx | 4 ++--
2 files changed, 7 insertions(+), 8 deletions(-)
diff --git a/numpy/random/_pcg64.pyx b/numpy/random/_pcg64.pyx
index dee38c0..f7891aa 100644
--- a/numpy/random/_pcg64.pyx
+++ b/numpy/random/_pcg64.pyx
@@ -26,8 +26,8 @@ cdef extern from "src/pcg64/pcg64.h":
void pcg64_get_state(pcg64_state *state, uint64_t *state_arr, int *has_uint32, uint32_t *uinteger)
void pcg64_set_state(pcg64_state *state, uint64_t *state_arr, int has_uint32, uint32_t uinteger)
- uint64_t pcg64_cm_next64(pcg64_state *state) nogil
- uint32_t pcg64_cm_next32(pcg64_state *state) nogil
+ uint64_t pcg64_cm_next64(pcg64_state *state) noexcept nogil
+ uint32_t pcg64_cm_next32(pcg64_state *state) noexcept nogil
void pcg64_cm_advance(pcg64_state *state, uint64_t *step)
cdef uint64_t pcg64_uint64(void* st) noexcept nogil:
@@ -39,13 +39,13 @@ cdef uint32_t pcg64_uint32(void *st) noexcept nogil:
cdef double pcg64_double(void* st) noexcept nogil:
return uint64_to_double(pcg64_next64(<pcg64_state *>st))
-cdef uint64_t pcg64_cm_uint64(void* st) nogil:
+cdef uint64_t pcg64_cm_uint64(void* st) noexcept nogil:
return pcg64_cm_next64(<pcg64_state *>st)
-cdef uint32_t pcg64_cm_uint32(void *st) nogil:
+cdef uint32_t pcg64_cm_uint32(void *st) noexcept nogil:
return pcg64_cm_next32(<pcg64_state *> st)
-cdef double pcg64_cm_double(void* st) nogil:
+cdef double pcg64_cm_double(void* st) noexcept nogil:
return uint64_to_double(pcg64_cm_next64(<pcg64_state *>st))
cdef class PCG64(BitGenerator):
@@ -515,4 +515,3 @@ cdef class PCG64DXSM(BitGenerator):
pcg64_cm_advance(&self.rng_state, <uint64_t *>np.PyArray_DATA(d))
self._reset_state_variables()
return self
-
diff --git a/numpy/random/_philox.pyx b/numpy/random/_philox.pyx
index e0c0504..e535346 100644
--- a/numpy/random/_philox.pyx
+++ b/numpy/random/_philox.pyx
@@ -36,8 +36,8 @@ cdef extern from 'src/philox/philox.h':
ctypedef s_philox_state philox_state
- uint64_t philox_next64(philox_state *state) nogil
- uint32_t philox_next32(philox_state *state) nogil
+ uint64_t philox_next64(philox_state *state) noexcept nogil
+ uint32_t philox_next32(philox_state *state) noexcept nogil
void philox_jump(philox_state *state)
void philox_advance(uint64_t *step, philox_state *state)
--
2.40.1
From 83d7c201d7ad01fcacb8a3a8da3206f77a01f274 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= <miro@hroncok.cz>
Date: Mon, 31 Jul 2023 11:46:23 +0200
Subject: [PATCH] Unpin Cython to allow 3
---
pyproject.toml | 2 +-
test_requirements.txt | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/pyproject.toml b/pyproject.toml
index 60e7f58..557ae21 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -3,7 +3,7 @@
requires = [
"setuptools==59.2.0",
"wheel==0.37.0",
- "Cython>=0.29.30,<3.0",
+ "Cython>=0.29.34",
]
diff --git a/test_requirements.txt b/test_requirements.txt
index 67b6a48..a065e99 100644
--- a/test_requirements.txt
+++ b/test_requirements.txt
@@ -1,4 +1,4 @@
-cython>=0.29.30,<3.0
+cython>=0.29.34
wheel==0.37.0
setuptools==59.2.0
hypothesis==6.24.1
--
2.40.1

View File

@ -0,0 +1,64 @@
From 7ade3828313dd437f4e2176ccbbc1ef52322de15 Mon Sep 17 00:00:00 2001
From: Ralf Gommers <ralf.gommers@gmail.com>
Date: Fri, 20 Oct 2023 17:29:26 +0200
Subject: [PATCH] Stop using removed `importlib.resources` functions on Python
>=3.13
Closes gh-12401
---
vendored-meson/meson/mesonbuild/dependencies/python.py | 8 +++++++-
vendored-meson/meson/mesonbuild/modules/python.py | 7 +++++--
2 files changed, 12 insertions(+), 3 deletions(-)
diff --git a/vendored-meson/meson/mesonbuild/dependencies/python.py b/vendored-meson/meson/mesonbuild/dependencies/python.py
index 1607728883df..186a6830ddbf 100644
--- a/vendored-meson/meson/mesonbuild/dependencies/python.py
+++ b/vendored-meson/meson/mesonbuild/dependencies/python.py
@@ -15,6 +15,7 @@
import functools, json, os, textwrap
from pathlib import Path
+import sys
import typing as T
from .. import mesonlib, mlog
@@ -110,8 +111,13 @@ def sanity(self) -> bool:
# Sanity check, we expect to have something that at least quacks in tune
import importlib.resources
+ if sys.version_info >= (3, 13):
+ traversable = importlib.resources.files('mesonbuild.scripts').joinpath('python_info.py')
+ context_mgr = importlib.resources.as_file(traversable)
+ else:
+ context_mgr = importlib.resources.path('mesonbuild.scripts', 'python_info.py')
- with importlib.resources.path('mesonbuild.scripts', 'python_info.py') as f:
+ with context_mgr as f:
cmd = self.get_command() + [str(f)]
p, stdout, stderr = mesonlib.Popen_safe(cmd)
diff --git a/vendored-meson/meson/mesonbuild/modules/python.py b/vendored-meson/meson/mesonbuild/modules/python.py
index ac74e13dc5b7..baeb85936614 100644
--- a/vendored-meson/meson/mesonbuild/modules/python.py
+++ b/vendored-meson/meson/mesonbuild/modules/python.py
@@ -13,7 +13,7 @@
# limitations under the License.
from __future__ import annotations
-import copy, json, os, shutil
+import copy, json, os, shutil, sys
import typing as T
from . import ExtensionModule, ModuleInfo
@@ -329,7 +329,10 @@ def should_append(f, isdir: bool = False):
import importlib.resources
pycompile = os.path.join(self.interpreter.environment.get_scratch_dir(), 'pycompile.py')
with open(pycompile, 'wb') as f:
- f.write(importlib.resources.read_binary('mesonbuild.scripts', 'pycompile.py'))
+ if sys.version_info >= (3, 13):
+ f.write(importlib.resources.files('mesonbuild.scripts').joinpath('pycompile.py').read_bytes())
+ else:
+ f.write(importlib.resources.read_binary('mesonbuild.scripts', 'pycompile.py'))
for i in self.installations.values():
if isinstance(i, PythonExternalProgram) and i.run_bytecompile[i.info['version']]:

15
f2py_test.patch Normal file
View File

@ -0,0 +1,15 @@
diff --git c/numpy/f2py/tests/test_compile_function.py i/numpy/f2py/tests/test_compile_function.py
index 3c16f3198..e38fed898 100644
--- c/numpy/f2py/tests/test_compile_function.py
+++ i/numpy/f2py/tests/test_compile_function.py
@@ -17,6 +17,10 @@ def setup_module():
pytest.skip("Needs C compiler")
if not util.has_f77_compiler():
pytest.skip("Needs FORTRAN 77 compiler")
+ if sys.version_info[:2] >= (3, 12):
+ pytest.skip(
+ "F2PY compilation tests do not work with meson."
+ )
# extra_args can be a list (since gh-11937) or string.

View File

@ -1,135 +0,0 @@
From f73d993bcb03701f4e9146005a65eb482689140a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Nikola=20Forr=C3=B3?= <nforro@redhat.com>
Date: Mon, 26 Oct 2020 18:54:22 +0100
Subject: [PATCH] TST: Make test suite work in FIPS (140-2) Mode
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Tests using MD5 algorithms fail in FIPS Mode because MD5 is not FIPS
compliant.
Mark usages of MD5 in test suite as not being used for security
purposes to overcome that.
Signed-off-by: Nikola Forró <nforro@redhat.com>
---
numpy/core/tests/test_regression.py | 2 +-
numpy/random/tests/test_generator_mt19937.py | 10 +++++-----
numpy/random/tests/test_random.py | 4 ++--
numpy/random/tests/test_randomstate.py | 6 +++---
4 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/numpy/core/tests/test_regression.py b/numpy/core/tests/test_regression.py
index 2e731d4fa..4633174d9 100644
--- a/numpy/core/tests/test_regression.py
+++ b/numpy/core/tests/test_regression.py
@@ -1509,7 +1509,7 @@ class TestRegression:
from hashlib import md5
x = np.array([1, 2, 3], dtype=np.dtype('<i4'))
- assert_equal(md5(x).hexdigest(), '2a1dd1e1e59d0a384c26951e316cd7e6')
+ assert_equal(md5(x, usedforsecurity=False).hexdigest(), '2a1dd1e1e59d0a384c26951e316cd7e6')
def test_0d_string_scalar(self):
# Bug #1436; the following should succeed
diff --git a/numpy/random/tests/test_generator_mt19937.py b/numpy/random/tests/test_generator_mt19937.py
index 6be7d852b..9b166e3a2 100644
--- a/numpy/random/tests/test_generator_mt19937.py
+++ b/numpy/random/tests/test_generator_mt19937.py
@@ -507,14 +507,14 @@ class TestIntegers:
val = random.integers(0, 6 - endpoint, size=1000, endpoint=endpoint,
dtype=dt).byteswap()
- res = hashlib.md5(val).hexdigest()
+ res = hashlib.md5(val, usedforsecurity=False).hexdigest()
assert_(tgt[np.dtype(dt).name] == res)
# bools do not depend on endianness
random = Generator(MT19937(1234))
val = random.integers(0, 2 - endpoint, size=1000, endpoint=endpoint,
dtype=bool).view(np.int8)
- res = hashlib.md5(val).hexdigest()
+ res = hashlib.md5(val, usedforsecurity=False).hexdigest()
assert_(tgt[np.dtype(bool).name] == res)
def test_repeatability_broadcasting(self, endpoint):
@@ -910,7 +910,7 @@ class TestRandomDist:
actual = random.choice(10000, 5000, replace=False)
if sys.byteorder != 'little':
actual = actual.byteswap()
- res = hashlib.md5(actual.view(np.int8)).hexdigest()
+ res = hashlib.md5(actual.view(np.int8), usedforsecurity=False).hexdigest()
assert_(choice_hash == res)
def test_bytes(self):
@@ -2436,7 +2436,7 @@ def test_jumped(config):
key = mt19937.state["state"]["key"]
if sys.byteorder == 'big':
key = key.byteswap()
- md5 = hashlib.md5(key)
+ md5 = hashlib.md5(key, usedforsecurity=False)
assert mt19937.state["state"]["pos"] == config["initial"]["pos"]
assert md5.hexdigest() == config["initial"]["key_md5"]
@@ -2444,7 +2444,7 @@ def test_jumped(config):
key = jumped.state["state"]["key"]
if sys.byteorder == 'big':
key = key.byteswap()
- md5 = hashlib.md5(key)
+ md5 = hashlib.md5(key, usedforsecurity=False)
assert jumped.state["state"]["pos"] == config["jumped"]["pos"]
assert md5.hexdigest() == config["jumped"]["key_md5"]
diff --git a/numpy/random/tests/test_random.py b/numpy/random/tests/test_random.py
index 276b5bc81..e49251af3 100644
--- a/numpy/random/tests/test_random.py
+++ b/numpy/random/tests/test_random.py
@@ -233,13 +233,13 @@ class TestRandint:
else:
val = self.rfunc(0, 6, size=1000, dtype=dt).byteswap()
- res = hashlib.md5(val.view(np.int8)).hexdigest()
+ res = hashlib.md5(val.view(np.int8), usedforsecurity=False).hexdigest()
assert_(tgt[np.dtype(dt).name] == res)
# bools do not depend on endianness
np.random.seed(1234)
val = self.rfunc(0, 2, size=1000, dtype=bool).view(np.int8)
- res = hashlib.md5(val).hexdigest()
+ res = hashlib.md5(val, usedforsecurity=False).hexdigest()
assert_(tgt[np.dtype(bool).name] == res)
def test_int64_uint64_corner_case(self):
diff --git a/numpy/random/tests/test_randomstate.py b/numpy/random/tests/test_randomstate.py
index 23dbbed6a..aa53d9322 100644
--- a/numpy/random/tests/test_randomstate.py
+++ b/numpy/random/tests/test_randomstate.py
@@ -341,13 +341,13 @@ class TestRandint:
else:
val = self.rfunc(0, 6, size=1000, dtype=dt).byteswap()
- res = hashlib.md5(val.view(np.int8)).hexdigest()
+ res = hashlib.md5(val.view(np.int8), usedforsecurity=False).hexdigest()
assert_(tgt[np.dtype(dt).name] == res)
# bools do not depend on endianness
random.seed(1234)
val = self.rfunc(0, 2, size=1000, dtype=bool).view(np.int8)
- res = hashlib.md5(val).hexdigest()
+ res = hashlib.md5(val, usedforsecurity=False).hexdigest()
assert_(tgt[np.dtype(bool).name] == res)
@pytest.mark.skipif(np.iinfo('l').max < 2**32,
@@ -1987,7 +1987,7 @@ def test_integer_repeat(int_func):
val = f(*args, size=1000000)
if sys.byteorder != 'little':
val = val.byteswap()
- res = hashlib.md5(val.view(np.int8)).hexdigest()
+ res = hashlib.md5(val.view(np.int8), usedforsecurity=False).hexdigest()
assert_(res == md5)
--
2.26.2

View File

@ -1,8 +1,8 @@
#uncomment next line for a release candidate or a beta
##%global relc rc1
#%%global relc rc1
# Simple way to disable tests
%if 0%{?flatpak}
%if 0%{?flatpak} || 0%{?rhel}
%bcond_with tests
%else
%bcond_without tests
@ -19,18 +19,26 @@
%global modname numpy
Name: numpy
Version: 1.19.4
Release: 1%{?dist}
Version: 1.26.0
Release: 2.0.riscv64%{?dist}
Epoch: 1
Summary: A fast multidimensional array facility for Python
# Everything is BSD except for class SafeEval in numpy/lib/utils.py which is Python
License: BSD and Python and ASL 2.0
License: BSD-3-Clause AND Apache-2.0
URL: http://www.numpy.org/
Source0: https://github.com/%{name}/%{name}/releases/download/v%{version}/%{name}-%{version}.tar.gz
Source1: https://numpy.org/doc/1.19/numpy-html.zip
Source1: https://numpy.org/doc/%(echo %{version} | cut -d. -f1-2)/numpy-html.zip
Patch0: f2py_test.patch
Patch1: 24772.patch
Patch2: 24776.patch
# Python 3.13: Patch vendored meson to work around the removed functions from importlib.resources
# Upstream commit: https://github.com/numpy/meson/commit/7ade3828313dd437f4e2176ccbbc1ef52322de15
Patch3: don-t-use-the-removed-importlib.patch
# Python 3.13: Replace deprecated ctypes.ARRAY(item_type, size) with item_type * size
# Upstream PR: https://github.com/numpy/numpy/pull/25198
Patch4: replace-deprecated-ctypes.ARRAY.patch
Patch0: numpy-1.19.2-FIPS.patch
%description
NumPy is a general-purpose array-processing package designed to
@ -48,7 +56,7 @@ this package is a version of f2py that works properly with NumPy.
%package -n python3-numpy
Summary: A fast multidimensional array facility for Python
License: BSD
License: BSD-3-Clause
%{?python_provide:%python_provide python3-numpy}
Provides: libnpymath-static = %{epoch}:%{version}-%{release}
Provides: libnpymath-static%{?_isa} = %{epoch}:%{version}-%{release}
@ -57,16 +65,18 @@ Provides: numpy%{?_isa} = %{epoch}:%{version}-%{release}
Obsoletes: numpy < 1:1.10.1-3
BuildRequires: python3-devel
BuildRequires: python3-setuptools
BuildRequires: python3-Cython
BuildRequires: gcc-gfortran gcc
BuildRequires: gcc-gfortran gcc gcc-c++
BuildRequires: lapack-devel
BuildRequires: python3-hypothesis
BuildRequires: ninja-build
BuildRequires: patchelf
%if %{with tests}
BuildRequires: python3-hypothesis
BuildRequires: python3-pytest
BuildRequires: python3-test
BuildRequires: python3-typing-extensions
%endif
BuildRequires: %{blaslib}-devel
BuildRequires: chrpath
%description -n python3-numpy
NumPy is a general-purpose array-processing package designed to
@ -106,8 +116,9 @@ This package provides the complete documentation for NumPy.
%prep
%autosetup -n %{name}-%{version} -p1
# Force re-cythonization (ifed for PKG-INFO presence in setup.py)
rm PKG-INFO
# Enable build with Python 3.13
# See: https://github.com/numpy/numpy/commit/82d7657ce39c97fcfd86e1a5acee8b5d00682169
sed -i 's/requires-python = ">=3.9,<3.13"/requires-python = ">=3.9"/' pyproject.toml
# openblas is provided by flexiblas by default; otherwise,
# Use openblas pthreads as recommended by upstream (see comment in site.cfg.example)
@ -117,13 +128,13 @@ libraries = %{blaslib}%{blasvar}
library_dirs = %{_libdir}
EOF
%generate_buildrequires
%pyproject_buildrequires -R -Csetup-args=-Dblas=flexiblas -Csetup-args=-Dlapack=lapack
%build
%set_build_flags
env OPENBLAS=%{_libdir} \
BLAS=%{_libdir} \
LAPACK=%{_libdir} CFLAGS="%{optflags}" \
%{__python3} setup.py build
%pyproject_wheel -Csetup-args=-Dblas=flexiblas -Csetup-args=-Dlapack=lapack
%install
mkdir docs
@ -131,13 +142,10 @@ pushd docs
unzip %{SOURCE1}
popd
#%%{__python3} setup.py install -O1 --skip-build --root %%{buildroot}
# skip-build currently broken, this works around it for now
env OPENBLAS=%{_libdir} \
FFTW=%{_libdir} BLAS=%{_libdir} \
LAPACK=%{_libdir} CFLAGS="%{optflags}" \
%{__python3} setup.py install --root %{buildroot}
%pyproject_install
pushd %{buildroot}%{_bindir} &> /dev/null
ln -s f2py f2py3
ln -s f2py f2py%{python3_version}
ln -s f2py3 f2py.numpy
popd &> /dev/null
@ -148,12 +156,27 @@ ln -s %{python3_sitearch}/%{name}/core/include/numpy/ %{buildroot}%{_includedir}
%check
%if %{with tests}
%ifarch ppc64le
# https://github.com/numpy/numpy/issues/14357
python3 runtests.py -- -k 'not test_einsum_sums_cfloat64'
%else
python3 runtests.py
export PYTHONPATH=%{buildroot}%{python3_sitearch}
# test_ppc64_ibm_double_double128 is unnecessary now that ppc64le has switched long doubles to IEEE format.
# https://github.com/numpy/numpy/issues/21094
%ifarch %{ix86}
# Weird RuntimeWarnings on i686, similar to https://github.com/numpy/numpy/issues/13173
# Some tests also overflow on 32bit
%global ix86_k and not test_vector_matrix_values and not test_matrix_vector_values and not test_identityless_reduction_huge_array and not (TestKind and test_all)
%endif
# test_deprecate_... fail on Python 3.13+ due to docstrings being dedented
# Upstream has removed the tests in git HEAD.
%if v"0%{python3_version}" >= v"3.13"
%global py313_k and not test_deprecate_help_indentation and not test_deprecate_preserve_whitespace
%endif
%ifarch riscv64
%global riscv64_k and not test_fpclass and not test_fp_noncontiguous and not (TestBoolCmp and test_float)
%endif
%ifnarch %{ix86}
python3 runtests.py --no-build -- -ra -k 'not test_ppc64_ibm_double_double128 %{?ix86_k} %{?riscv64_k} %{?py313_k}' \
-W "ignore:pkg_resources is deprecated as an API::pkg_resources"
%endif
%endif
@ -164,7 +187,6 @@ python3 runtests.py
%dir %{python3_sitearch}/%{name}
%{python3_sitearch}/%{name}/*.py*
%{python3_sitearch}/%{name}/core
%{python3_sitearch}/%{name}/distutils
%{python3_sitearch}/%{name}/doc
%{python3_sitearch}/%{name}/fft
%{python3_sitearch}/%{name}/lib
@ -176,11 +198,16 @@ python3 runtests.py
%{python3_sitearch}/%{name}/compat
%{python3_sitearch}/%{name}/matrixlib
%{python3_sitearch}/%{name}/polynomial
%{python3_sitearch}/%{name}-*.egg-info
%exclude %{python3_sitearch}/%{name}/LICENSE.txt
%{python3_sitearch}/%{name}-*.dist-info
%{_includedir}/numpy
%{python3_sitearch}/%{name}/__init__.pxd
%{python3_sitearch}/%{name}/__init__.cython-30.pxd
%{python3_sitearch}/%{name}/py.typed
%{python3_sitearch}/%{name}/typing/
%{python3_sitearch}/%{name}/array_api/
%{python3_sitearch}/%{name}/_pyinstaller/
%{python3_sitearch}/%{name}/_typing/
%{python3_sitearch}/%{name}/_utils/
%files -n python3-numpy-f2py
%{_bindir}/f2py
@ -194,6 +221,110 @@ python3 runtests.py
%changelog
* Fri Dec 01 2023 David Abdurachmanov <davidlt@rivosinc.com> - 1:1.26.0-2.0.riscv64
- Skip failing tests on riscv64
* Mon Nov 20 2023 Gwyn Ciesla <gwync@protonmail.com> - 1:1.26.0-2
- Fix FTBFS with Python 3.13.
* Tue Sep 19 2023 Gwyn Ciesla <gwync@protonmail.com> - 1:1.26.0-1
- 1.26.0
* Mon Jul 31 2023 Miro Hrončok <mhroncok@redhat.com> - 1:1.24.4-2
- Backport support for Cython 3
* Tue Jul 18 2023 Gwyn Ciesla <gwync@protonmail.com> - 1:1.24.4-1
- 1.24.4
* Wed Jul 05 2023 Scott Talbert <swt@techie.net> - 1:1.24.3-4
- Fix FTBFS with Python 3.12
* Fri Jun 16 2023 Python Maint <python-maint@redhat.com> - 1:1.24.3-3
- Rebuilt for Python 3.12
* Tue Jun 13 2023 Python Maint <python-maint@redhat.com> - 1:1.24.3-2
- Bootstrap for Python 3.12
* Mon Apr 24 2023 Gwyn Ciesla <gwync@protonmail.com> - 1:1.24.3-1
- 1.24.3
* Wed Mar 08 2023 Gwyn Ciesla <gwync@protonmail.com> - 1:1.24.1-3
- migrated to SPDX license
* Fri Jan 27 2023 Pavel Simovec <psimovec@redhat.com> - 1:1.24.1-2
- Generalize documentation Source link
- Add forgotten documentation file
* Thu Jan 26 2023 Pavel Simovec <psimovec@redhat.com> - 1:1.24.1-1
- Update to 1.24.1
* Thu Jan 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1:1.23.5-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
* Fri Dec 02 2022 Charalampos Stratakis <cstratak@redhat.com> - 1:1.23.5-1
- Update to 1.23.5
* Fri Oct 21 2022 Miro Hrončok <mhroncok@redhat.com> - 1:1.23.4-1
- Update to 1.23.4
- Use distutils from setuptools to build the package
* Fri Jul 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1:1.22.0-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
* Mon Jul 18 2022 Miro Hrončok <mhroncok@redhat.com> - 1:1.22.0-6
- GenericAlias fixes for Python 3.11.0b4+
* Mon Jun 13 2022 Python Maint <python-maint@redhat.com> - 1:1.22.0-5
- Rebuilt for Python 3.11
* Mon Mar 07 2022 Karolina Surma <ksurma@redhat.com> - 1:1.22.0-4
- Work around the test failures with setuptools >= 60.x by using the Python's
standard library distutils
- Build numpy using Python's standard library distutils
* Sat Feb 19 2022 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 1:1.22.0-3
- Re-enable tests
* Thu Jan 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1:1.22.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
* Thu Jan 06 2022 Gwyn Ciesla <gwync@protonmail.com> - 1:1.22.0-1
- 1.22.0
* Wed Dec 22 2021 Gwyn Ciesla <gwync@protonmail.com> - 1:1.21.5-1
- 1.21.5
* Thu Aug 05 2021 Gwyn Ciesla <gwync@protonmail.com> - 1:1.21.1-1
- 1.21.1, disabing tests as they depend on .coveragerc, not shipped.
* Thu Jul 22 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1:1.20.1-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
* Thu Jun 03 2021 Python Maint <python-maint@redhat.com> - 1:1.20.1-4
- Rebuilt for Python 3.10
* Fri May 07 2021 Gwyn Ciesla <gwync@protonmail.com> - 1:1.20.1-3
- Python 3.10 fix.
- Xfail TestCond.test_nan.
* Fri Feb 12 2021 Nikola Forró <nforro@redhat.com> - 1:1.20.1-2
- Fix build requirements, hypothesis is a test dependency
* Mon Feb 08 2021 Gwyn Ciesla <gwync@protonmail.com> 1:1.20.1-1
- 1.21.1
* Mon Feb 01 2021 Gwyn Ciesla <gwync@protonmail.com> - 1:1.20.0-1
- 1.20.0 final.
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1:1.20.0-0.2.rc2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Mon Jan 04 2021 Nikola Forró <nforro@redhat.com> - 1:1.20.0-0.1.rc2
- Generate the main dispatcher config header into the build dir
* Mon Dec 28 2020 Gwyn Ciesla <gwync@protonmail.com> - 1:1.20.0-0.rc2
- 1.20.0 rc2
* Tue Nov 03 2020 Gwyn Ciesla <gwync@protonmail.com> - 1:1.19.4-1
- 1.19.4

View File

@ -0,0 +1,28 @@
From d9155244ea06705ebd9194cc7a621e82316b61ba Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= <miro@hroncok.cz>
Date: Mon, 20 Nov 2023 11:36:36 +0100
Subject: [PATCH] MAINT: Replace deprecated ctypes.ARRAY(item_type, size) with
item_type * size
See https://github.com/python/cpython/issues/105733
---
numpy/core/tests/test_ufunc.py | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/numpy/core/tests/test_ufunc.py b/numpy/core/tests/test_ufunc.py
index a7401ff616f..fc1fd5af169 100644
--- a/numpy/core/tests/test_ufunc.py
+++ b/numpy/core/tests/test_ufunc.py
@@ -2985,9 +2985,9 @@ def test_resolve_dtypes_reduction_errors(self):
reason="`ctypes.pythonapi` required for capsule unpacking.")
def test_loop_access(self):
# This is a basic test for the full strided loop access
- data_t = ct.ARRAY(ct.c_char_p, 2)
- dim_t = ct.ARRAY(ct.c_ssize_t, 1)
- strides_t = ct.ARRAY(ct.c_ssize_t, 2)
+ data_t = ct.c_char_p * 2
+ dim_t = ct.c_ssize_t * 1
+ strides_t = ct.c_ssize_t * 2
strided_loop_t = ct.CFUNCTYPE(
ct.c_int, ct.c_void_p, data_t, dim_t, strides_t, ct.c_void_p)

View File

@ -1,2 +1,2 @@
SHA512 (numpy-1.19.4.tar.gz) = 50529dd1ae64e578c35ecfd19cb3a601b32fccdf88ca2c1161bc13e57e20bbbb58d3ac44e3afa80967c537338246425dfe9d57dd9f04d58346e5be605c529726
SHA512 (numpy-html.zip) = 4a421636523424a0703290b6a0ba53b85a9a9e8a6256363e2481f1c02ae278825c09f2f13d39e99f8aae21f57a4978723f3fc690693520f8c3b45a5b4c5a38ab
SHA512 (numpy-1.26.0.tar.gz) = 0d500c623b274a219740c78ae2febb32a2f167016a9ff529678526e6b3e89a5b732c41defa23460a5da6f7f89d4a7d827f44fa9a1334c78e204b00ce164fb40c
SHA512 (numpy-html.zip) = 9c38a65fd33be28cec9a27d2b23b50cb215fe7fd775f467a78a21f4649466868a24b6004ebf1b31e0eca62c2e5582e89923ff2bb4b3ae70dfa9292672e7b1eca