Accepting request 734807 from devel:languages:python:numeric

- Force cythonization to ensure build under different versions of
  python

- disable tests TestF77ReturnCharacter and TestF90ReturnCharacter for s390x
  https://github.com/numpy/numpy/issues/11831
  to make the package build.
  * s390x.patch

- Update to 1.17.2:
  * #14418: BUG: Fix aradixsort indirect indexing.
  * #14420: DOC: Fix a minor typo in dispatch documentation.
  * #14421: BUG: test, fix regression in converting to ctypes
  * #14430: BUG: Do not show Override module in private error classes.
  * #14432: BUG: Fixed maximum relative error reporting in assert_allclose.
  * #14433: BUG: Fix uint-overflow if padding with linear_ramp and negative...
  * #14436: BUG: Update 1.17.x with 1.18.0-dev pocketfft.py.
- Add dep on pytest-xdist and use threaded tests execution
  shaving around 400s on local build

OBS-URL: https://build.opensuse.org/request/show/734807
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-numpy?expand=0&rev=84
This commit is contained in:
Dominique Leuenberger 2019-10-10 09:49:51 +00:00 committed by Git OBS Bridge
commit 1aded1c7b3
5 changed files with 96 additions and 49 deletions

View File

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

3
numpy-1.17.2.zip Normal file
View File

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

View File

@ -1,3 +1,31 @@
-------------------------------------------------------------------
Thu Oct 3 13:53:35 UTC 2019 - Tomáš Chvátal <tchvatal@suse.com>
- Force cythonization to ensure build under different versions of
python
-------------------------------------------------------------------
Thu Sep 26 11:52:40 UTC 2019 - Berthold Gunreben <azouhr@opensuse.org>
- disable tests TestF77ReturnCharacter and TestF90ReturnCharacter for s390x
https://github.com/numpy/numpy/issues/11831
to make the package build.
* s390x.patch
-------------------------------------------------------------------
Thu Sep 26 08:03:28 UTC 2019 - Tomáš Chvátal <tchvatal@suse.com>
- Update to 1.17.2:
* #14418: BUG: Fix aradixsort indirect indexing.
* #14420: DOC: Fix a minor typo in dispatch documentation.
* #14421: BUG: test, fix regression in converting to ctypes
* #14430: BUG: Do not show Override module in private error classes.
* #14432: BUG: Fixed maximum relative error reporting in assert_allclose.
* #14433: BUG: Fix uint-overflow if padding with linear_ramp and negative...
* #14436: BUG: Update 1.17.x with 1.18.0-dev pocketfft.py.
- Add dep on pytest-xdist and use threaded tests execution
shaving around 400s on local build
-------------------------------------------------------------------
Fri Sep 6 08:51:30 UTC 2019 - Michel Normand <normand@linux.vnet.ibm.com>

View File

@ -17,15 +17,10 @@
%global flavor @BUILD_FLAVOR@%{nil}
%define _ver 1_17_1
%define pname python-numpy
%bcond_with ringdisabled
%define hpc_upcase_trans_hyph() %(echo %{**} | tr [a-z] [A-Z] | tr '-' '_')
%if "%flavor" == ""
%if "%{flavor}" == ""
%bcond_with hpc
%if 0%{?sle_version} == 120300 && !0%{?is_opensuse}
%bcond_with openblas
@ -37,54 +32,51 @@
%endif
%endif
%endif
%if "%flavor" == "gnu-hpc"
%if "%{flavor}" == "gnu-hpc"
%bcond_without hpc
%bcond_without openblas
%endif
%if "%flavor" == "gnu7-hpc"
%bcond_without hpc
%bcond_without openblas
%if "%{flavor}" == "gnu7-hpc"
%define c_f_ver 7
%bcond_without hpc
%bcond_without openblas
%endif
%if 0%{?sle_version} == 120300
%{?with_openblas:ExclusiveArch: do_not_build}
%endif
%ifarch s390 s390x
%{?with_openblas:ExclusiveArch: do_not_build}
%endif
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%define skip_python2 1
%{?with_hpc:%{hpc_requires}}
%bcond_with ringdisabled
%if %{without hpc}
%define package_name %{pname}
%define p_python_sitearch %python_sitearch
%define p_prefix %_prefix
%define p_bindir %_bindir
%define p_python_sitearch %{python_sitearch}
%define p_prefix %{_prefix}
%define p_bindir %{_bindir}
%else
%{!?compiler_family:%global compiler_family gnu}
%{hpc_init -c %{compiler_family} %{?c_f_ver:-v %{c_f_ver}} %{?mpi_ver:-V %{mpi_ver}}}
%define package_name %{hpc_package_name %{_ver}}
%define p_python_sitearch %{hpc_python_sitearch}
%define p_prefix %{hpc_prefix}
%define p_bindir %{hpc_bindir}
# Magic for OBS Staging. Only build the flavors required by
# other packages in the ring.
%if %{with ringdisabled}
ExclusiveArch: do_not_build
%endif
%{!?compiler_family:%global compiler_family gnu}
%{hpc_init -c %compiler_family %{?c_f_ver:-v %{c_f_ver}} %{?mpi_ver:-V %{mpi_ver}}}
%define package_name %{hpc_package_name %_ver}
%define p_python_sitearch %hpc_python_sitearch
%define p_prefix %hpc_prefix
%define p_bindir %hpc_bindir
%endif
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%define skip_python2 1
Name: %{package_name}
Version: 1.17.1
Version: 1.17.2
Release: 0
Summary: NumPy array processing for numbers, strings, records and objects
License: BSD-3-Clause
Group: Development/Libraries/Python
Url: http://www.numpy.org/
Source: https://pypi.io/packages/source/n/numpy/numpy-%{version}.zip
Source: https://files.pythonhosted.org/packages/source/n/numpy/numpy-%{version}.zip
Source99: python-numpy-rpmlintrc
# PATCH-FIX-OPENSUSE numpy-buildfix.patch -- openSUSE-specific build fixes
Patch0: numpy-buildfix.patch
@ -94,6 +86,14 @@ Patch1: numpy-1.9.0-remove-__declspec.patch
Patch2: riscv.patch
# # PATCH-FIX-SLE fix-py34-tests.patch -- python 3.4 support
Patch3: fix-py34-tests.patch
Patch4: s390x.patch
BuildRequires: %{python_module Cython >= 0.29.13}
BuildRequires: %{python_module devel}
BuildRequires: %{python_module pytest-xdist}
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module setuptools}
BuildRequires: python-rpm-macros
BuildRequires: unzip
%if 0%{?suse_version}
BuildRequires: fdupes
%endif
@ -116,15 +116,6 @@ BuildRequires: lua-lmod
BuildRequires: suse-hpc
Requires: libopenblas%{?hpc_ext}-%{compiler_family}%{?c_f_ver}-hpc
%endif
BuildRequires: %{python_module Cython >= 0.29.2}
BuildRequires: %{python_module devel}
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module setuptools}
BuildRequires: python-rpm-macros
BuildRequires: unzip
%{?with_hpc:%{hpc_requires}}
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%python_subpackages
%description
@ -155,7 +146,7 @@ Requires: lapack-devel
%endif
%else
Requires: libopenblas%{?hpc_ext}-%{compiler_family}%{?c_f_ver}-hpc-devel
%hpc_requires_devel
%{hpc_requires_devel}
%endif
%description devel
@ -169,9 +160,15 @@ This package contains files for developing applications using numpy.
%patch1 -p1
%patch2 -p1
%patch3 -p1
%ifarch s390x
%patch4 -p1
%endif
# Fix non-executable scripts
sed -i '1s/^#!.*$//' numpy/{compat/setup,distutils/{conv_template,cpuinfo,exec_command,from_template,setup,system_info},f2py/{__init__,auxfuncs,capi_maps,cb_rules,cfuncs,common_rules,crackfortran,diagnose,f2py2e,f90mod_rules,func2subr,rules,setup,use_rules},ma/{setup,bench},matrixlib/setup,setup,testing/{print_coercion_tables,setup}}.py
# force cythonization
rm PKG-INFO
%build
%define _lto_cflags %{nil}
%if %{with hpc}
@ -191,7 +188,7 @@ export CFLAGS="%{optflags} -fno-strict-aliasing"
%python_build
%install
%{?with_hpc:%{hpc_setup}}
%{?with_hpc:%hpc_setup}
%{?with_hpc:module load openblas}
%python_exec setup.py install --prefix=%{p_prefix} --root=%{buildroot}
@ -239,8 +236,8 @@ if [ expr [ module-info mode load ] || [module-info mode display ] ] {
prepend-path PATH %{hpc_bindir}
prepend-path PYTHONPATH ${sitesearch_path}
setenv %{hpc_upcase_trans_hyph %pname}_DIR %{hpc_prefix}
setenv %{hpc_upcase_trans_hyph %pname}_BIN %{hpc_bindir}
setenv %{hpc_upcase_trans_hyph %{pname}}_DIR %{hpc_prefix}
setenv %{hpc_upcase_trans_hyph %{pname}}_BIN %{hpc_bindir}
family "NumPy"
EOF
@ -249,14 +246,16 @@ EOF
%check
%if %{without hpc}
pushd doc &> /dev/null
export PYTHONDONTWRITEBYTECODE=1
export PATH="%{buildroot}%{_bindir}:$PATH"
mkdir testing
pushd testing
%ifarch ppc64 ppc64le
%python_expand PYTHONPATH="%{buildroot}%{$python_sitearch}" PATH="%{buildroot}%{_bindir}:$PATH" $python -m pytest -v --pyargs numpy || echo "Warning: ignore check error for PowerPC bypass boo#1148173"
%pytest_arch -n auto --pyargs numpy || echo "Warning: ignore check error for PowerPC bypass boo#1148173"
%else
%python_expand PYTHONPATH="%{buildroot}%{$python_sitearch}" PATH="%{buildroot}%{_bindir}:$PATH" $python -m pytest -v --pyargs numpy
%pytest_arch -n auto --pyargs numpy
%endif
popd &> /dev/null
popd
%endif
%files %{python_files}
@ -287,7 +286,7 @@ popd &> /dev/null
%define hpc_module_pname python%(a=%{hpc_python_version}; echo -n ${a/.*/})-numpy
%{hpc_modules_files}
%{hpc_dirs}
%dir %hpc_bindir
%dir %{hpc_bindir}
%dir %{hpc_libdir}/python%{hpc_python_version}
%dir %{p_python_sitearch}
%endif

20
s390x.patch Normal file
View File

@ -0,0 +1,20 @@
Index: numpy-1.16.4/numpy/f2py/tests/test_return_character.py
===================================================================
--- numpy-1.16.4.orig/numpy/f2py/tests/test_return_character.py
+++ numpy-1.16.4/numpy/f2py/tests/test_return_character.py
@@ -32,6 +32,7 @@ class TestReturnCharacter(util.F2PyTest)
raise NotImplementedError
+@pytest.mark.skip(reason="Test broken on s390x")
class TestF77ReturnCharacter(TestReturnCharacter):
code = """
function t0(value)
@@ -87,6 +88,7 @@ cf2py intent(out) ts
self.check_function(getattr(self.module, name))
+@pytest.mark.skip(reason="Test broken on s390x")
class TestF90ReturnCharacter(TestReturnCharacter):
suffix = ".f90"
code = """