SHA256
1
0
forked from pool/python-numpy

Accepting request 679050 from devel:languages:python:numeric

- Do not bother with standard flavor, just make it default
- Execute the tests only on standard package for now not hpc variants
- Add constraints for testsuite to not run out of mem/disk space
- Use %license macro
- Enable testsuite

OBS-URL: https://build.opensuse.org/request/show/679050
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-numpy?expand=0&rev=74
This commit is contained in:
Stephan Kulow 2019-03-01 19:28:20 +00:00 committed by Git OBS Bridge
commit e3f48a114e
4 changed files with 38 additions and 7 deletions

10
_constraints Normal file
View File

@ -0,0 +1,10 @@
<constraints>
<hardware>
<physicalmemory>
<size unit="G">5</size>
</physicalmemory>
<disk>
<size unit="G">5</size>
</disk>
</hardware>
</constraints>

View File

@ -1,4 +1,3 @@
<multibuild>
<package>standard</package>
<package>gnu-hpc</package>
</multibuild>

View File

@ -1,3 +1,20 @@
-------------------------------------------------------------------
Wed Feb 20 10:43:28 UTC 2019 - Tomáš Chvátal <tchvatal@suse.com>
- Do not bother with standard flavor, just make it default
- Execute the tests only on standard package for now not hpc variants
-------------------------------------------------------------------
Wed Feb 20 09:28:00 UTC 2019 - Tomáš Chvátal <tchvatal@suse.com>
- Add constraints for testsuite to not run out of mem/disk space
- Use %license macro
-------------------------------------------------------------------
Tue Feb 19 12:52:51 UTC 2019 - Tomáš Chvátal <tchvatal@suse.com>
- Enable testsuite
-------------------------------------------------------------------
Tue Feb 5 22:14:25 UTC 2019 - Todd R <toddrme2178@gmail.com>

View File

@ -27,10 +27,6 @@
%define hpc_upcase_trans_hyph() %(echo %{**} | tr [a-z] [A-Z] | tr '-' '_')
%if "%flavor" == ""
ExclusiveArch: do_not_build
%endif
%if "%flavor" == "standard"
%bcond_with hpc
%if 0%{?sle_version} == 120300 && !0%{?is_opensuse}
%bcond_with openblas
@ -119,6 +115,7 @@ Requires: libopenblas%{?hpc_ext}-%{compiler_family}%{?c_f_ver}-hpc
%endif
BuildRequires: %{python_module Cython}
BuildRequires: %{python_module devel}
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module setuptools}
BuildRequires: python-rpm-macros
BuildRequires: unzip
@ -200,7 +197,7 @@ export CFLAGS="%{optflags} -fno-strict-aliasing"
%if %{without hpc}
%python_expand rm -rf %{buildroot}%{$python_sitearch}/numpy/{,core,distutils,f2py,fft,lib,linalg,ma,matrixlib,oldnumeric,polynomial,random,testing}/tests # Don't package testsuite
#%%python_expand rm -rf %{buildroot}%{$python_sitearch}/numpy/{,core,distutils,f2py,fft,lib,linalg,ma,matrixlib,oldnumeric,polynomial,random,testing}/tests # Don't package testsuite
%else
@ -245,6 +242,14 @@ EOF
}
%endif
%check
%if %{without hpc}
pushd doc &> /dev/null
export PYTHONDONTWRITEBYTECODE=1
%python_expand PYTHONPATH="%{buildroot}%{$python_sitearch}" PATH="%{buildroot}%{_bindir}:$PATH" $python -m pytest -v --pyargs numpy
popd &> /dev/null
%endif
%files %{python_files}
%defattr(-,root,root)
%doc *.txt
@ -270,7 +275,7 @@ EOF
%files %{python_files devel}
%defattr(-,root,root)
%doc LICENSE.txt
%license LICENSE.txt
%{p_python_sitearch}/numpy/*/*/*.c
%{p_python_sitearch}/numpy/*/*.h
%{p_python_sitearch}/numpy/*/*/*.h