File python-scipy.spec of Package python-scipy
Name: python-scipy
License: BSD
Group: Development/Libraries/Python
Version: 0.6.0
Release: 1
Summary: Scipy: Scientific Tools for Python
URL: http://www.scipy.org
Source: scipy-%{version}.tar.gz
# # Patch to adapt to numpy.distutils api change for 1.0.3
# Patch1: python-scipy.numdistfix.patch
Patch1: python-scipy.64bits.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Prefix: %{_prefix}
Packager: David Cournapeau <cournape@gmail.com>
#%py_requires
Requires: python-numpy libblas.so.3 liblapack.so.3
# TODO: fix for blas/lapack dependencies: should check for capabilities, not packages
BuildRequires: python python-devel python-numpy >= 1.0.3.1 gcc-c++ lapack3-devel refblas3-devel
%description
SciPy is open-source software for mathematics, science, and
engineering. The core library is NumPy which provides convenient and
fast N-dimensional array manipulation. The SciPy library is built to
work with NumPy arrays, and provides many user-friendly and efficient
numerical routines such as routines for numerical integration and
optimization. Together, they run on all popular operating systems, are
quick to install, and are free of charge. NumPy and SciPy are easy to
use, but powerful enough to be depended upon by some of the world's
leading scientists and engineers.
%prep
%define py_sitedir %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")
%setup -q -n scipy-%{version}
%patch1 -p 1
#%patch2 -p 1
%build
python setup.py config_fc --fcompiler=gnu95 build
%install
%if 0%{?suse_version}
python setup.py install --root=$RPM_BUILD_ROOT \
--record-rpm=INSTALLED_FILES --prefix=/usr
%endif
%if 0%{?fedora_version} >= 5 || 0%{?rhel_version} || 0%{?centos_version}
python setup.py install --root=$RPM_BUILD_ROOT \
--record=INSTALLED_FILES --prefix=/usr
%endif
%clean
rm -rf $RPM_BUILD_ROOT
#%files -f INSTALLED_FILES
%files
%defattr(-,root,root,-)
# the following does not work on 64 bits arch.
#%{py_sitedir}/*
%{_libdir}/python*/site-packages/scipy/
# the egg is not produced on fedora 7 (something to do with different
# configuration wrt setuptools on the build farm ?)
%define SCIPY_EGG 1
%if 0%{?fedora_version}|| 0%{?rhel_version} || 0%{?centos_version}
%define SCIPY_EGG 0
%endif
%if 0%{?sles_version}
%define SCIPY_EGG 0
%endif
%if %{SCIPY_EGG}
%{_libdir}/python*/site-packages/scipy*.egg-info
%endif