2009-02-12 04:52:59 +01:00
|
|
|
#
|
2011-02-04 20:12:16 +01:00
|
|
|
# spec file for package python-numpy
|
2009-02-12 04:52:59 +01:00
|
|
|
#
|
2016-03-16 10:43:17 +01:00
|
|
|
# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
|
2009-02-12 04:52:59 +01:00
|
|
|
#
|
|
|
|
# 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/
|
|
|
|
#
|
|
|
|
|
2012-11-14 09:16:14 +01:00
|
|
|
|
2013-11-14 08:43:27 +01:00
|
|
|
%define with_atlas 0
|
2016-09-17 14:34:03 +02:00
|
|
|
%if 0%{?suse_version}
|
|
|
|
%if 0%{?suse_version} <= 1110
|
|
|
|
%{!?python_sitearch: %global python_sitearch %(python -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}
|
|
|
|
%else
|
|
|
|
%py_requires
|
|
|
|
%endif
|
|
|
|
BuildRequires: fdupes
|
|
|
|
BuildRequires: gcc-fortran
|
|
|
|
%else
|
|
|
|
%if ! 0%{?fedora_version}
|
|
|
|
Provides: python-numeric = %{version}
|
|
|
|
Obsoletes: python-numeric < %{version}
|
|
|
|
%endif
|
|
|
|
BuildRequires: gcc-gfortran
|
|
|
|
%endif
|
2014-08-13 17:19:54 +02:00
|
|
|
Name: python-numpy
|
2016-09-17 14:34:03 +02:00
|
|
|
Version: 1.11.1
|
2011-09-22 10:58:19 +02:00
|
|
|
Release: 0
|
|
|
|
Summary: NumPy array processing for numbers, strings, records and objects
|
|
|
|
License: BSD-3-Clause
|
|
|
|
Group: Development/Libraries/Python
|
2016-09-17 14:34:03 +02:00
|
|
|
Url: http://www.numpy.org/
|
|
|
|
Source: https://pypi.io/packages/source/n/numpy/numpy-%{version}.tar.gz
|
2014-09-10 17:02:05 +02:00
|
|
|
# PATCH-FIX-OPENSUSE numpy-buildfix.patch -- openSUSE-specific build fixes
|
2013-11-14 08:43:27 +01:00
|
|
|
Patch0: numpy-buildfix.patch
|
2014-09-10 17:02:05 +02:00
|
|
|
# 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
|
2016-04-11 09:12:48 +02:00
|
|
|
# PATCH-FIX-OPENSUSE numpy-1.10.4-cblas.patch -- fix for building with system cblas.
|
|
|
|
Patch2: numpy-1.10.4-cblas.patch
|
2012-04-17 22:01:01 +02:00
|
|
|
BuildRequires: blas-devel
|
|
|
|
BuildRequires: lapack-devel
|
2013-11-14 08:43:27 +01:00
|
|
|
BuildRequires: python-devel >= 2.6
|
2016-04-11 09:12:48 +02:00
|
|
|
BuildRequires: python-setuptools
|
2012-06-07 15:39:34 +02:00
|
|
|
Requires: python >= %{py_ver}
|
|
|
|
Provides: numpy = %{version}
|
2016-09-17 14:34:03 +02:00
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
|
|
%if 0%{?is_opensuse} && ( 0%{?suse_version} > 1320 || 0%{?suse_version} == 1315 )
|
|
|
|
BuildRequires: cblas-devel
|
|
|
|
%endif
|
2013-11-14 08:43:27 +01:00
|
|
|
%if %{with_atlas} == 1
|
|
|
|
BuildRequires: libatlas3-devel
|
|
|
|
%endif
|
2009-02-12 04:52:59 +01:00
|
|
|
|
|
|
|
%description
|
2010-03-05 15:57:57 +01:00
|
|
|
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.
|
2009-02-12 04:52:59 +01:00
|
|
|
|
2010-03-05 15:57:57 +01:00
|
|
|
There are also basic facilities for discrete fourier transform,
|
|
|
|
basic linear algebra and random number generation.
|
2009-02-12 04:52:59 +01:00
|
|
|
|
2010-03-05 15:57:57 +01:00
|
|
|
%package devel
|
2014-08-13 17:19:54 +02:00
|
|
|
Summary: Development files for numpy applications
|
2010-03-05 15:57:57 +01:00
|
|
|
Group: Development/Libraries/Python
|
|
|
|
Requires: %{name} = %{version}
|
2012-04-17 22:01:01 +02:00
|
|
|
Requires: blas-devel
|
|
|
|
Requires: lapack-devel
|
2013-11-14 08:43:27 +01:00
|
|
|
Requires: python-devel >= %{py_ver}
|
2011-09-22 10:58:19 +02:00
|
|
|
%if 0%{?suse_version}
|
2010-03-05 15:57:57 +01:00
|
|
|
Requires: gcc-fortran
|
2012-05-21 08:07:34 +02:00
|
|
|
%py_requires -d
|
2011-09-22 10:58:19 +02:00
|
|
|
%else
|
2012-05-21 08:07:34 +02:00
|
|
|
Requires: gcc-gfortran
|
2011-09-22 10:58:19 +02:00
|
|
|
%endif
|
2013-11-14 08:43:27 +01:00
|
|
|
%if %{with_atlas} == 1
|
|
|
|
Requires: libatlas3-devel
|
|
|
|
%endif
|
2016-04-11 09:12:48 +02:00
|
|
|
%if 0%{?suse_version} > 1320 || 0%{?suse_version} == 1315
|
|
|
|
Requires: cblas-devel
|
|
|
|
%endif
|
2009-02-12 04:52:59 +01:00
|
|
|
|
2010-03-05 15:57:57 +01:00
|
|
|
%description devel
|
2014-08-13 17:19:54 +02:00
|
|
|
This package contains files for developing applications using numpy.
|
2009-02-12 04:52:59 +01:00
|
|
|
|
|
|
|
%prep
|
2014-08-13 17:19:54 +02:00
|
|
|
%setup -q -n numpy-%{version}
|
2013-11-14 08:43:27 +01:00
|
|
|
%patch0 -p1
|
2014-09-10 17:02:05 +02:00
|
|
|
%patch1 -p1
|
2016-04-11 09:12:48 +02:00
|
|
|
%if 0%{?suse_version} > 1320 || 0%{?suse_version} == 1315
|
|
|
|
%patch2 -p1
|
|
|
|
%endif
|
2013-11-14 08:43:27 +01:00
|
|
|
# Fix non-executable scripts
|
2014-09-10 17:02:05 +02:00
|
|
|
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
|
2009-02-12 04:52:59 +01:00
|
|
|
|
|
|
|
%build
|
2011-09-22 10:58:19 +02:00
|
|
|
CFLAGS="%{optflags} -fno-strict-aliasing" python setup.py build
|
2009-02-12 04:52:59 +01:00
|
|
|
|
|
|
|
%install
|
2016-09-17 14:34:03 +02:00
|
|
|
python setup.py install --root=%{buildroot} --prefix="%{_prefix}"
|
2014-09-10 17:02:05 +02:00
|
|
|
rm -rf %{buildroot}%{python_sitearch}/numpy/{,core,distutils,f2py,fft,lib,linalg,ma,matrixlib,oldnumeric,polynomial,random,testing}/tests # Don't package testsuite
|
2012-05-21 08:07:34 +02:00
|
|
|
%if 0%{?suse_version}
|
2011-09-22 10:58:19 +02:00
|
|
|
%fdupes -s %{buildroot}%{_prefix}
|
2010-03-05 15:57:57 +01:00
|
|
|
%endif
|
2009-02-12 04:52:59 +01:00
|
|
|
|
2010-03-05 15:57:57 +01:00
|
|
|
%files
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%doc *.txt
|
2012-05-21 08:07:34 +02:00
|
|
|
%{_bindir}/f2py
|
2014-08-13 17:19:54 +02:00
|
|
|
%{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
|
2010-03-05 15:57:57 +01:00
|
|
|
|
2011-09-22 10:58:19 +02:00
|
|
|
%files devel
|
2009-02-12 04:52:59 +01:00
|
|
|
%defattr(-,root,root)
|
2014-08-13 17:19:54 +02:00
|
|
|
%{python_sitearch}/numpy/*/*/*.c
|
|
|
|
%{python_sitearch}/numpy/*/*.h
|
|
|
|
%{python_sitearch}/numpy/*/*/*.h
|
|
|
|
%{python_sitearch}/numpy/*/*/*/*.h
|
|
|
|
%{python_sitearch}/numpy/core/lib/libnpymath.a
|
2009-02-12 04:52:59 +01:00
|
|
|
|
|
|
|
%changelog
|