File python-scipy.spec of Package python-scipy
#
# spec file for package python-scipy
#
# Copyright (c) 2015 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/
#
%define with_atlas 0
Name: python-scipy
Version: 0.16.0
Release: 0
Summary: Scientific Tools for Python
License: BSD-3-Clause
Group: Development/Libraries/Python
Url: http://www.scipy.org
Source0: https://pypi.python.org/packages/source/s/scipy/scipy-%{version}.tar.gz
BuildRequires: blas-devel
BuildRequires: fdupes
BuildRequires: fftw-devel
BuildRequires: gcc-c++
BuildRequires: gcc-fortran
BuildRequires: lapack-devel
BuildRequires: python-Cython >= 0.19
BuildRequires: python-devel
BuildRequires: python-numpy-devel >= 1.5.1
BuildRequires: swig
%if 0%{?suse_version} > 1140
BuildRequires: suitesparse-devel-static
%endif
%if %{with_atlas} == 1
BuildRequires: libatlas3-devel
%endif
%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
Requires: python-numpy >= 1.5.1
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%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.
%package weave
Summary: DEPRECATED Scientific Tools for Python - Weave
Group: Development/Libraries/Python
Requires: %{name} = %{version}
Provides: python-scipy-devel = %{version}
%description weave
IMPORTANT: python-scipy-weave is deprecated and will be removed in
an upcoming python-scipy release. Please use python-weave instead.
It is an identical package that has been split out of the scipy
sources.
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
%setup -q -n scipy-%{version}
find . -type f -name "*.py" -exec sed -i "s|#!/usr/bin/env python||" {} \;
cat > site.cfg << EOF
[amd]
library_dirs = %{_libdir}
include_dirs = /usr/include/suitesparse:/usr/include/ufsparse
amd_libs = amd
[umfpack]
library_dirs = %{_libdir}
include_dirs = /usr/include/suitesparse:/usr/include/ufsparse
umfpack_libs = umfpack
EOF
%build
%if %{with_atlas} == 1
export ATLAS=%{_libdir}/atlas
%endif
CFLAGS="%{optflags} -fno-strict-aliasing" \
FFTW=%{_libdir} \
BLAS=%{_libdir} \
LAPACK=%{_libdir} \
python setup.py config_fc --fcompiler=gnu95 --noarch build
%install
python setup.py install --prefix=%{_prefix} --root=%{buildroot}
find %{buildroot}%{python_sitearch}/scipy -type d -name tests | xargs rm -rf # Don't ship tests
# Don't ship weave examples, they're marked as documentation:
find %{buildroot}%{python_sitearch}/scipy/weave -type d -name examples | xargs rm -rf
%fdupes %{buildroot}%{python_sitearch}
# fix executability issue
chmod +x %{buildroot}%{python_sitearch}/scipy/io/arff/arffread.py
chmod +x %{buildroot}%{python_sitearch}/scipy/special/spfun_stats.py
chmod +x %{buildroot}%{python_sitearch}/scipy/special/generate_ufuncs.py
%files
%defattr(-,root,root,-)
%doc LICENSE.txt
%{python_sitearch}/scipy/
%{python_sitearch}/scipy-%{version}-py*.egg-info
%exclude %{python_sitearch}/scipy/weave
%files weave
%defattr(-,root,root,-)
%doc scipy/weave/examples
%{python_sitearch}/scipy/weave
%changelog