Marcus Rueckert
6d3d2856f1
Accepted submit request 60094 from user matejcik OBS-URL: https://build.opensuse.org/request/show/60094 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-numpy?expand=0&rev=10
137 lines
4.1 KiB
RPMSpec
137 lines
4.1 KiB
RPMSpec
#
|
|
# spec file for package python-numpy (Version 1.5.1)
|
|
#
|
|
# Copyright (c) 2010 SUSE LINUX Products 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/
|
|
#
|
|
|
|
|
|
|
|
Name: python-numpy
|
|
Summary: NumPy: array processing for numbers, strings, records and objects
|
|
License: BSD
|
|
Group: Development/Libraries/Python
|
|
Version: 1.5.1
|
|
Release: 1
|
|
Url: http://sourceforge.net/projects/numpy
|
|
Provides: numpy = %version-%release
|
|
%if 0%{?fedora_version} == 0
|
|
Provides: python-numeric = %version-%release
|
|
%endif
|
|
BuildRequires: python-devel >= 2.4
|
|
BuildRequires: lapack
|
|
BuildRequires: blas
|
|
%if 0%{?suse_version}
|
|
BuildRequires: gcc-fortran
|
|
%py_requires
|
|
%else
|
|
BuildRequires: gcc-gfortran
|
|
%{!?py_sitedir: %global py_sitedir %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}
|
|
%endif
|
|
%if 0%{?suse_version} > 1020
|
|
BuildRequires: fdupes
|
|
%endif
|
|
Source: numpy-%{version}.tar.bz2
|
|
Source1: python-numpy-rpmlintrc
|
|
Patch1: numpy-buildfix.patch
|
|
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
|
|
License: BSD
|
|
Summary: Development files for numpy applications
|
|
Group: Development/Libraries/Python
|
|
Requires: %{name} = %{version}
|
|
Requires: python-devel
|
|
Requires: lapack
|
|
Requires: blas
|
|
Requires: gcc-fortran
|
|
|
|
%description devel
|
|
This package contains files for developing applications using numpy.
|
|
|
|
%prep
|
|
%setup -q -n numpy-%{version}
|
|
%patch1 -p0
|
|
for i in $(find . -name "*.py"); do
|
|
sed -i 's|^.*env python$|#!%{_bindir}/python|g' $i
|
|
done
|
|
|
|
%build
|
|
env CFLAGS="%{optflags} -fno-strict-aliasing" \
|
|
%{__python} setup.py build
|
|
|
|
%install
|
|
%{__python} setup.py install \
|
|
--root="%{buildroot}" \
|
|
--prefix="%{_prefix}"
|
|
|
|
# make rpmlint happy, add executable flag, even if the file
|
|
# should be called by another script
|
|
# find %{buildroot}%{py_sitedir}/numpy/ -type f -name "*.py" -print0 | xargs -0 chmod +x
|
|
|
|
# save space
|
|
%if 0%{?suse_version} > 1020
|
|
%fdupes -s %{buildroot}
|
|
%endif
|
|
|
|
%clean
|
|
rm -rf %{buildroot}
|
|
|
|
%files
|
|
%defattr(-,root,root)
|
|
%doc *.txt
|
|
%dir %{py_sitedir}/numpy
|
|
%{_bindir}/*
|
|
%if 0%{?sles_version} == 0
|
|
%if 0%{?suse_version} >= 1020 || 0%{?fedora_version}
|
|
%{py_sitedir}/*info
|
|
%endif
|
|
%endif
|
|
%{py_sitedir}/numpy/*
|
|
%exclude %{py_sitedir}/numpy/*/*/*.c
|
|
# %exclude %{py_sitedir}/numpy/*/*/*/*.c
|
|
%exclude %{py_sitedir}/numpy/*/*/*/*/*.c
|
|
%exclude %{py_sitedir}/numpy/*/*.h
|
|
%exclude %{py_sitedir}/numpy/*/*/*.h
|
|
%exclude %{py_sitedir}/numpy/*/*/*/*.h
|
|
%exclude %{py_sitedir}/numpy/*/*/*/*/*.h
|
|
# %exclude %{py_sitedir}/numpy/*/*/*/*.cxx
|
|
# %exclude %{py_sitedir}/numpy/*/*/*/*.cpp
|
|
|
|
%files devel
|
|
%defattr(-,root,root)
|
|
%{py_sitedir}/numpy/*/*/*.c
|
|
# %{py_sitedir}/numpy/*/*/*/*.c
|
|
%{py_sitedir}/numpy/*/*/*/*/*.c
|
|
%{py_sitedir}/numpy/*/*.h
|
|
%{py_sitedir}/numpy/*/*/*.h
|
|
%{py_sitedir}/numpy/*/*/*/*.h
|
|
%{py_sitedir}/numpy/*/*/*/*/*.h
|
|
# %{py_sitedir}/numpy/*/*/*/*.cxx
|
|
# %{py_sitedir}/numpy/*/*/*/*.cpp
|
|
|
|
%changelog
|