Accepting request 1043806 from home:bnavigator:branches:devel:languages:python:numeric

- Update to 1.24.0
  * The NumPy 1.24.0 release continues the ongoing work to improve
    the handling and promotion of dtypes, increase the execution
    speed, and clarify the documentation. There are also a large
    number of new and expired deprecations due to changes in
    promotion and cleanups. This might be called a deprecation
    release. Highlights are:
    - Many new deprecations, check them out.
    - Many expired deprecations,
    - New F2PY features and fixes.
    - New “dtype” and “casting” keywords for stacking functions.
  * For a detailed description see
    https://numpy.org/doc/stable/release/1.24.0-notes.html
- Add numpy-distutils-ignore.patch gh#numpy/numpy#22828
- Fix running the tests: Actually fail on errors
- Support builds without any primary python3 package (:backports)

OBS-URL: https://build.opensuse.org/request/show/1043806
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:numeric/python-numpy?expand=0&rev=111
This commit is contained in:
Dirk Mueller 2022-12-20 06:18:27 +00:00 committed by Git OBS Bridge
parent 812da66f8e
commit 02883a96ec
7 changed files with 98 additions and 23 deletions

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:ed2cc92af0efad20198638c69bb0fc2870a58dabfba6eb722c933b48556c686c
size 10728765

3
numpy-1.24.0.tar.gz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:c4ab7c9711fe6b235e86487ca74c1b092a6dd59a3cb45b63241ea0a148501853
size 10897101

View File

@ -13,14 +13,16 @@ build to fail. Since this is windows-specific, it can be
safely removed.
--- a/numpy/core/setup_common.py
+++ b/numpy/core/setup_common.py
@@ -226,7 +226,7 @@ OPTIONAL_FUNCTION_ATTRIBUTES = [('__attr
]
Index: numpy-1.24.0/numpy/core/setup_common.py
===================================================================
--- numpy-1.24.0.orig/numpy/core/setup_common.py
+++ numpy-1.24.0/numpy/core/setup_common.py
@@ -141,7 +141,7 @@ OPTIONAL_FILE_FUNCS = ["ftello", "fseeko
OPTIONAL_MISC_FUNCS = ["backtrace", "madvise"]
# variable attributes tested via "int %s a" % attribute
-OPTIONAL_VARIABLE_ATTRIBUTES = ["__thread", "__declspec(thread)"]
+OPTIONAL_VARIABLE_ATTRIBUTES = ["__thread"]
# Subset of OPTIONAL_STDFUNCS which may already have HAVE_* defined by Python.h
OPTIONAL_STDFUNCS_MAYBE = [
# Subset of OPTIONAL_*_FUNCS which may already have HAVE_* defined by Python.h
OPTIONAL_FUNCS_MAYBE = [

View File

@ -0,0 +1,13 @@
Index: numpy-1.24.0/numpy/tests/test_public_api.py
===================================================================
--- numpy-1.24.0.orig/numpy/tests/test_public_api.py
+++ numpy-1.24.0/numpy/tests/test_public_api.py
@@ -351,6 +351,8 @@ def test_all_modules_are_expected():
SKIP_LIST_2 = [
'numpy.math',
'numpy.distutils.log.sys',
+ 'numpy.distutils.log.logging',
+ 'numpy.distutils.log.warnings',
'numpy.doc.constants.re',
'numpy.doc.constants.textwrap',
'numpy.lib.emath',

View File

@ -1,3 +1,6 @@
# This file is required for testing
addFilter("devel-file-in-non-devel-package.*/usr/lib.*/python.*/site-packages/numpy/f2py/tests/src/array_from_pyobj/wrapmodule.c")
# These files are required for testing (and testing the package on a live system)
addFilter("devel-file-in-non-devel-package.*numpy/f2py/tests/src/array_from_pyobj/wrapmodule.c")
addFilter("devel-file-in-non-devel-package.*numpy/core/tests/examples")
addFilter("devel-file-in-non-devel-package.*numpy/core/tests/data")
addFilter("hidden-file-or-dir .*/numpy/f2py/tests/src/assumed_shape/.f2py_f2cmap")
addFilter("hidden-file-or-dir .*/numpy/f2py/tests/src/f2cmap/.f2py_f2cmap")

View File

@ -1,3 +1,27 @@
-------------------------------------------------------------------
Mon Dec 19 13:36:35 UTC 2022 - Ben Greiner <code@bnavigator.de>
- Update to 1.24.0
* The NumPy 1.24.0 release continues the ongoing work to improve
the handling and promotion of dtypes, increase the execution
speed, and clarify the documentation. There are also a large
number of new and expired deprecations due to changes in
promotion and cleanups. This might be called a deprecation
release. Highlights are:
- Many new deprecations, check them out.
- Many expired deprecations,
- New F2PY features and fixes.
- New “dtype” and “casting” keywords for stacking functions.
* For a detailed description see
https://numpy.org/doc/stable/release/1.24.0-notes.html
- Add numpy-distutils-ignore.patch gh#numpy/numpy#22828
- Fix running the tests: Actually fail on errors
-------------------------------------------------------------------
Wed Dec 14 20:59:50 UTC 2022 - Ben Greiner <code@bnavigator.de>
- Support builds without any primary python3 package (:backports)
-------------------------------------------------------------------
Thu Oct 20 13:48:08 UTC 2022 - Ben Greiner <code@bnavigator.de>

View File

@ -17,9 +17,10 @@
%global flavor @BUILD_FLAVOR@%{nil}
%define ver 1.23.4
%define _ver 1_23_4
%define ver 1.24.0
%define _ver 1_24_0
%define pname python-numpy
%define plainpython python
%define hpc_upcase_trans_hyph() %(echo %{**} | tr [a-z] [A-Z] | tr '-' '_')
%if "%{flavor}" == ""
%bcond_with hpc
@ -82,25 +83,28 @@ Source99: python-numpy-rpmlintrc
Patch0: numpy-buildfix.patch
# PATCH-FIX-OPENSUSE numpy-1.9.0-remove-__declspec.patch -- fix for spurious compiler warnings that cause build failure
Patch1: numpy-1.9.0-remove-__declspec.patch
# PATCH-FIX-UPSTREAM numpy-distutils-ignore.patch -- gh#numpy/numpy#22828
Patch2: numpy-distutils-ignore.patch
BuildRequires: %{python_module Cython >= 0.29.30}
BuildRequires: %{python_module base >= 3.8}
BuildRequires: %{python_module devel}
BuildRequires: %{python_module hypothesis >= 6.24.1}
BuildRequires: %{python_module pytest >= 6.2.5}
BuildRequires: %{python_module pytest-xdist}
BuildRequires: %{python_module setuptools >= 60.0.0}
BuildRequires: %{python_module testsuite}
BuildRequires: gcc-c++
BuildRequires: python-rpm-macros >= 20210929
BuildConflicts: gcc11 < 11.2
%if 0%{?suse_version}
BuildRequires: fdupes
%endif
# SECTION test requirements
BuildRequires: %{python_module pytest >= 6.2.5}
BuildRequires: %{python_module hypothesis >= 6.24.1}
BuildRequires: %{python_module pytest-xdist}
BuildRequires: %{python_module testsuite}
BuildRequires: %{python_module typing-extensions >= 4.2.0}
# /SECTION
%if %{without hpc}
# Last version which packaged %%{_bindir}/f2py without update-alternatives
# Protect it from substitution
%define oldpy_numpy python-numpy
Conflicts: %{oldpy_numpy} <= 1.12.0
Conflicts: %{plainpython}-numpy <= 1.12.0
%if 0%{?suse_version}
BuildRequires: gcc-fortran
%else
@ -149,6 +153,7 @@ basic linear algebra and random number generation.
Summary: Development files for numpy applications
Requires: %{name} = %{version}
Requires: python-devel
Requires: %plainpython(abi) = %{python_version}
%if %{without hpc}
%if %{with openblas}
Requires: openblas-devel
@ -202,6 +207,9 @@ export CFLAGS="%{optflags} -fno-strict-aliasing"
%if !%{with hpc}
%python_clone -a %{buildroot}%{_bindir}/f2py
%python_expand rm %{buildroot}%{$python_sitearch}/numpy/core/include/numpy/.doxyfile
%else
rm %{buildroot}%{p_python_sitearch}/numpy/core/include/numpy/.doxyfile
%endif
%if 0%{?suse_version}
@ -253,6 +261,7 @@ EOF
%endif
%check
# https://numpy.org/doc/stable/dev/development_environment.html#running-tests
%if %{without hpc}
export PATH="%{buildroot}%{_bindir}:$PATH"
@ -263,6 +272,12 @@ pushd testing
# flaky tests
test_failok+=" or test_structured_object_indexing"
test_failok+=" or test_structured_object_item_setting"
# flaky due to memory consumption
test_failok+=" or test_big_arrays"
# gh#numpy/numpy#22825
test_failok+=" or TestPrintOptions"
# gh#numpy/numpy#22835
test_failok+=" or test_keepdims_out"
# boo#1148173 gh#numpy/numpy#14438
%ifarch ppc64 ppc64le
test_failok+=" or test_generalized_sq"
@ -272,6 +287,10 @@ test_failok+=" or test_generalized_sq"
test_failok+=" or TestF77ReturnCharacter"
test_failok+=" or TestF90ReturnCharacter"
%endif
# missing instruction set
%ifarch s390x
test_failok+=" or test_truncate_f32"
%endif
%ifarch %{ix86}
# (arm 32-bit seems okay here)
# gh#numpy/numpy#18387
@ -279,6 +298,13 @@ test_failok+=" or test_pareto"
# gh#numpy/numpy#18388
test_failok+=" or test_float_remainder_overflow"
%endif
%ifarch %{ix86} %{arm32}
# too much memory for 32bit
test_failok+=" or test_identityless_reduction_huge_array"
test_failok+=" or test_huge_vectordot"
# invalid int type for 32bit
test_failok+=" or (test_kind and test_all)"
%endif
%ifarch riscv64
# These tests fail due to non-portable assumptions about the signbit of NaN
# gh#numpy/numpy#8213
@ -289,15 +315,17 @@ test_failok+=" or test_float"
echo "
import sys
import numpy
numpy.test(label='full', verbose=2,
extra_argv=['-v', '-n', 'auto', '-k'] + sys.argv[1:])
r = numpy.test(label='full', verbose=2,
extra_argv=['-v', '-n', 'auto', '-k'] + sys.argv[1:])
sys.exit(0 if r else 1)
" > runobstest.py
%{python_expand # for all python3 flavors
export PYTHONPATH=%{buildroot}%{$python_sitearch}
export PYTHONDONTWRITEBYTECODE=1
[ -n "$test_failok" ] && $python runobstest.py "${test_failok:4}" ||:
$python runobstest.py "not (${test_failok:4})"
# test_new_policy: duplicates test runs and output and does not follow our deselection
$python runobstest.py "not (test_new_policy ${test_failok})"
}
popd
@ -321,6 +349,8 @@ popd
%python_alternative %{_bindir}/f2py
%if "%{python_flavor}" == "python3" || "%{python_provides}" == "python3"
%{_bindir}/f2py3
%else
%exclude %{_bindir}/f2py3
%endif
%{_bindir}/f2py%{python_bin_suffix}
%{python_sitearch}/numpy/
@ -336,6 +366,9 @@ popd
%if "%{python_flavor}" == "python3" || "%{python_provides}" == "python3"
%{p_bindir}/f2py
%{p_bindir}/f2py3
%else
%exclude %{p_bindir}/f2py
%exclude %{p_bindir}/f2py3
%endif
%{p_bindir}/f2py%{python_bin_suffix}
%{p_python_sitearch}/numpy/