python-numpy/python-numpy.spec

145 lines
4.7 KiB
RPMSpec
Raw Normal View History

#
# spec file for package python-numpy
#
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
%if 0%{?is_opensuse} == 0
%bcond_with openblas
%else
%ifarch armv6l
%bcond_with openblas
%ifarch s390x
%bcond_with openblas
Accepting request 426983 from devel:languages:python - use pypi.io as Source URL - Don't include cblas-devel on SLES 12 - update to 1.11.1: - #7506 BUG: Make sure numpy imports on python 2.6 when nose is unavailable. - #7530 BUG: Floating exception with invalid axis in np.lexsort. - #7535 BUG: Extend glibc complex trig functions blacklist to glibc < 2.18. - #7551 BUG: Allow graceful recovery for no compiler. - #7558 BUG: Constant padding expected wrong type in constant_values. - #7578 BUG: Fix OverflowError in Python 3.x. in swig interface. - #7590 BLD: Fix configparser.InterpolationSyntaxError. - #7597 BUG: Make np.ma.take work on scalars. - #7608 BUG: linalg.norm(): Don't convert object arrays to float. - #7638 BLD: Correct C compiler customization in system_info.py. - #7654 BUG: ma.median of 1d array should return a scalar. - #7656 BLD: Remove hardcoded Intel compiler flag -xSSE4.2. - #7660 BUG: Temporary fix for str(mvoid) for object field types. - #7665 BUG: Fix incorrect printing of 1D masked arrays. - #7670 BUG: Correct initial index estimate in histogram. - #7671 BUG: Boolean assignment no GIL release when transfer needs API. - #7676 BUG: Fix handling of right edge of final histogram bin. - #7680 BUG: Fix np.clip bug NaN handling for Visual Studio 2015. - #7724 BUG: Fix segfaults in np.random.shuffle. - #7731 MAINT: Change mkl_info.dir_env_var from MKL to MKLROOT. OBS-URL: https://build.opensuse.org/request/show/426983 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-numpy?expand=0&rev=50
2016-09-17 14:34:03 +02:00
%else
%else
%if 0%{?sle_version} == 120200
%ifarch i586
%bcond_with openblas
%else
%bcond_without openblas
Accepting request 426983 from devel:languages:python - use pypi.io as Source URL - Don't include cblas-devel on SLES 12 - update to 1.11.1: - #7506 BUG: Make sure numpy imports on python 2.6 when nose is unavailable. - #7530 BUG: Floating exception with invalid axis in np.lexsort. - #7535 BUG: Extend glibc complex trig functions blacklist to glibc < 2.18. - #7551 BUG: Allow graceful recovery for no compiler. - #7558 BUG: Constant padding expected wrong type in constant_values. - #7578 BUG: Fix OverflowError in Python 3.x. in swig interface. - #7590 BLD: Fix configparser.InterpolationSyntaxError. - #7597 BUG: Make np.ma.take work on scalars. - #7608 BUG: linalg.norm(): Don't convert object arrays to float. - #7638 BLD: Correct C compiler customization in system_info.py. - #7654 BUG: ma.median of 1d array should return a scalar. - #7656 BLD: Remove hardcoded Intel compiler flag -xSSE4.2. - #7660 BUG: Temporary fix for str(mvoid) for object field types. - #7665 BUG: Fix incorrect printing of 1D masked arrays. - #7670 BUG: Correct initial index estimate in histogram. - #7671 BUG: Boolean assignment no GIL release when transfer needs API. - #7676 BUG: Fix handling of right edge of final histogram bin. - #7680 BUG: Fix np.clip bug NaN handling for Visual Studio 2015. - #7724 BUG: Fix segfaults in np.random.shuffle. - #7731 MAINT: Change mkl_info.dir_env_var from MKL to MKLROOT. OBS-URL: https://build.opensuse.org/request/show/426983 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-numpy?expand=0&rev=50
2016-09-17 14:34:03 +02:00
%endif
%else
%bcond_without openblas
%endif
Accepting request 426983 from devel:languages:python - use pypi.io as Source URL - Don't include cblas-devel on SLES 12 - update to 1.11.1: - #7506 BUG: Make sure numpy imports on python 2.6 when nose is unavailable. - #7530 BUG: Floating exception with invalid axis in np.lexsort. - #7535 BUG: Extend glibc complex trig functions blacklist to glibc < 2.18. - #7551 BUG: Allow graceful recovery for no compiler. - #7558 BUG: Constant padding expected wrong type in constant_values. - #7578 BUG: Fix OverflowError in Python 3.x. in swig interface. - #7590 BLD: Fix configparser.InterpolationSyntaxError. - #7597 BUG: Make np.ma.take work on scalars. - #7608 BUG: linalg.norm(): Don't convert object arrays to float. - #7638 BLD: Correct C compiler customization in system_info.py. - #7654 BUG: ma.median of 1d array should return a scalar. - #7656 BLD: Remove hardcoded Intel compiler flag -xSSE4.2. - #7660 BUG: Temporary fix for str(mvoid) for object field types. - #7665 BUG: Fix incorrect printing of 1D masked arrays. - #7670 BUG: Correct initial index estimate in histogram. - #7671 BUG: Boolean assignment no GIL release when transfer needs API. - #7676 BUG: Fix handling of right edge of final histogram bin. - #7680 BUG: Fix np.clip bug NaN handling for Visual Studio 2015. - #7724 BUG: Fix segfaults in np.random.shuffle. - #7731 MAINT: Change mkl_info.dir_env_var from MKL to MKLROOT. OBS-URL: https://build.opensuse.org/request/show/426983 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-numpy?expand=0&rev=50
2016-09-17 14:34:03 +02:00
%endif
%endif
%endif
Name: python-numpy
Version: 1.12.0
Release: 0
Summary: NumPy array processing for numbers, strings, records and objects
License: BSD-3-Clause
Group: Development/Libraries/Python
Accepting request 426983 from devel:languages:python - use pypi.io as Source URL - Don't include cblas-devel on SLES 12 - update to 1.11.1: - #7506 BUG: Make sure numpy imports on python 2.6 when nose is unavailable. - #7530 BUG: Floating exception with invalid axis in np.lexsort. - #7535 BUG: Extend glibc complex trig functions blacklist to glibc < 2.18. - #7551 BUG: Allow graceful recovery for no compiler. - #7558 BUG: Constant padding expected wrong type in constant_values. - #7578 BUG: Fix OverflowError in Python 3.x. in swig interface. - #7590 BLD: Fix configparser.InterpolationSyntaxError. - #7597 BUG: Make np.ma.take work on scalars. - #7608 BUG: linalg.norm(): Don't convert object arrays to float. - #7638 BLD: Correct C compiler customization in system_info.py. - #7654 BUG: ma.median of 1d array should return a scalar. - #7656 BLD: Remove hardcoded Intel compiler flag -xSSE4.2. - #7660 BUG: Temporary fix for str(mvoid) for object field types. - #7665 BUG: Fix incorrect printing of 1D masked arrays. - #7670 BUG: Correct initial index estimate in histogram. - #7671 BUG: Boolean assignment no GIL release when transfer needs API. - #7676 BUG: Fix handling of right edge of final histogram bin. - #7680 BUG: Fix np.clip bug NaN handling for Visual Studio 2015. - #7724 BUG: Fix segfaults in np.random.shuffle. - #7731 MAINT: Change mkl_info.dir_env_var from MKL to MKLROOT. OBS-URL: https://build.opensuse.org/request/show/426983 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-numpy?expand=0&rev=50
2016-09-17 14:34:03 +02:00
Url: http://www.numpy.org/
Source: https://pypi.io/packages/source/n/numpy/numpy-%{version}.zip
# PATCH-FIX-OPENSUSE numpy-buildfix.patch -- openSUSE-specific build fixes
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
BuildRequires: blas-devel
BuildRequires: lapack-devel
BuildRequires: unzip
%if %{with openblas}
BuildRequires: openblas-devel
%endif
BuildRequires: python-devel >= 2.6
BuildRequires: python-setuptools
%if 0%{?suse_version} <= 1110
%{!?python_sitearch: %global python_sitearch %(python -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}
%endif
%if 0%{?suse_version}
BuildRequires: fdupes
BuildRequires: gcc-fortran
%else
BuildRequires: gcc-gfortran
Accepting request 426983 from devel:languages:python - use pypi.io as Source URL - Don't include cblas-devel on SLES 12 - update to 1.11.1: - #7506 BUG: Make sure numpy imports on python 2.6 when nose is unavailable. - #7530 BUG: Floating exception with invalid axis in np.lexsort. - #7535 BUG: Extend glibc complex trig functions blacklist to glibc < 2.18. - #7551 BUG: Allow graceful recovery for no compiler. - #7558 BUG: Constant padding expected wrong type in constant_values. - #7578 BUG: Fix OverflowError in Python 3.x. in swig interface. - #7590 BLD: Fix configparser.InterpolationSyntaxError. - #7597 BUG: Make np.ma.take work on scalars. - #7608 BUG: linalg.norm(): Don't convert object arrays to float. - #7638 BLD: Correct C compiler customization in system_info.py. - #7654 BUG: ma.median of 1d array should return a scalar. - #7656 BLD: Remove hardcoded Intel compiler flag -xSSE4.2. - #7660 BUG: Temporary fix for str(mvoid) for object field types. - #7665 BUG: Fix incorrect printing of 1D masked arrays. - #7670 BUG: Correct initial index estimate in histogram. - #7671 BUG: Boolean assignment no GIL release when transfer needs API. - #7676 BUG: Fix handling of right edge of final histogram bin. - #7680 BUG: Fix np.clip bug NaN handling for Visual Studio 2015. - #7724 BUG: Fix segfaults in np.random.shuffle. - #7731 MAINT: Change mkl_info.dir_env_var from MKL to MKLROOT. OBS-URL: https://build.opensuse.org/request/show/426983 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-numpy?expand=0&rev=50
2016-09-17 14:34:03 +02:00
%endif
%if ! 0%{?fedora_version}
Provides: python-numeric = %{version}
Obsoletes: python-numeric < %{version}
%endif
Provides: numpy = %{version}
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
NumPy is a general-purpose array-processing package designed to
efficiently manipulate large multi-dimensional arrays of arbitrary
records without sacrificing too much speed for small multi-dimensional
arrays. NumPy is built on the Numeric code base and adds features
introduced by numarray as well as an extended C-API and the ability to
create arrays of arbitrary type which also makes NumPy suitable for
interfacing with general-purpose data-base applications.
There are also basic facilities for discrete fourier transform,
basic linear algebra and random number generation.
%package devel
Summary: Development files for numpy applications
Group: Development/Libraries/Python
Requires: %{name} = %{version}
Requires: blas-devel
Requires: lapack-devel
Requires: python-devel >= %{py_ver}
%if %{with openblas}
BuildRequires: openblas-devel
%endif
%if 0%{?suse_version}
Requires: gcc-fortran
%else
Requires: gcc-gfortran
%endif
%description devel
This package contains files for developing applications using numpy.
%prep
%setup -q -n numpy-%{version}
%patch0 -p1
%patch1 -p1
# Fix non-executable scripts
sed -i "1d" 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,matrixlib/setup,setup,testing/{print_coercion_tables,setup}}.py
%build
CFLAGS="%{optflags} -fno-strict-aliasing" python setup.py build
%install
Accepting request 426983 from devel:languages:python - use pypi.io as Source URL - Don't include cblas-devel on SLES 12 - update to 1.11.1: - #7506 BUG: Make sure numpy imports on python 2.6 when nose is unavailable. - #7530 BUG: Floating exception with invalid axis in np.lexsort. - #7535 BUG: Extend glibc complex trig functions blacklist to glibc < 2.18. - #7551 BUG: Allow graceful recovery for no compiler. - #7558 BUG: Constant padding expected wrong type in constant_values. - #7578 BUG: Fix OverflowError in Python 3.x. in swig interface. - #7590 BLD: Fix configparser.InterpolationSyntaxError. - #7597 BUG: Make np.ma.take work on scalars. - #7608 BUG: linalg.norm(): Don't convert object arrays to float. - #7638 BLD: Correct C compiler customization in system_info.py. - #7654 BUG: ma.median of 1d array should return a scalar. - #7656 BLD: Remove hardcoded Intel compiler flag -xSSE4.2. - #7660 BUG: Temporary fix for str(mvoid) for object field types. - #7665 BUG: Fix incorrect printing of 1D masked arrays. - #7670 BUG: Correct initial index estimate in histogram. - #7671 BUG: Boolean assignment no GIL release when transfer needs API. - #7676 BUG: Fix handling of right edge of final histogram bin. - #7680 BUG: Fix np.clip bug NaN handling for Visual Studio 2015. - #7724 BUG: Fix segfaults in np.random.shuffle. - #7731 MAINT: Change mkl_info.dir_env_var from MKL to MKLROOT. OBS-URL: https://build.opensuse.org/request/show/426983 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-numpy?expand=0&rev=50
2016-09-17 14:34:03 +02:00
python setup.py install --root=%{buildroot} --prefix="%{_prefix}"
rm -rf %{buildroot}%{python_sitearch}/numpy/{,core,distutils,f2py,fft,lib,linalg,ma,matrixlib,oldnumeric,polynomial,random,testing}/tests # Don't package testsuite
%if 0%{?suse_version}
%fdupes -s %{buildroot}%{_prefix}
%endif
%files
%defattr(-,root,root)
%doc *.txt
%{_bindir}/f2py
%{python_sitearch}/numpy/
%{python_sitearch}/numpy-%{version}-py*.egg-info
%exclude %{python_sitearch}/numpy/*/*/*.c
%exclude %{python_sitearch}/numpy/*/*.h
%exclude %{python_sitearch}/numpy/*/*/*.h
%exclude %{python_sitearch}/numpy/*/*/*/*.h
%exclude %{python_sitearch}/numpy/core/lib/libnpymath.a
%files devel
%defattr(-,root,root)
%{python_sitearch}/numpy/*/*/*.c
%{python_sitearch}/numpy/*/*.h
%{python_sitearch}/numpy/*/*/*.h
%{python_sitearch}/numpy/*/*/*/*.h
%{python_sitearch}/numpy/core/lib/libnpymath.a
%changelog