File python-scipy.spec of Package python-scipy.12546
#
# spec file for package python-scipy
#
# 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 s390x
%bcond_with openblas
%else
%if 0%{?sle_version} == 120200
%ifarch i586
%bcond_with openblas
%else
%bcond_without openblas
%endif
%else
%bcond_without openblas
%endif
%endif
%endif
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-scipy
Version: 1.2.2
Release: 0
Summary: Scientific Tools for Python
License: BSD-3-Clause and LGPL-2.0+
Group: Development/Libraries/Python
Url: http://www.scipy.org
Source0: https://files.pythonhosted.org/packages/source/s/scipy/scipy-%{version}.tar.gz
Source100: python-scipy-rpmlintrc
# PATCH-FIX-OPENSUSE - no_implicit_decl.patch - Fix implicit-pointer-decl warnings and implicit-fortify-decl error
Patch0: no_implicit_decl.patch
BuildRequires: blas-devel
BuildRequires: fdupes
BuildRequires: fftw-devel
BuildRequires: gcc-c++
BuildRequires: gcc-fortran
BuildRequires: lapack-devel
BuildRequires: lapacke-devel
BuildRequires: suitesparse-devel-static
BuildRequires: swig
%if %{with openblas}
BuildRequires: openblas-devel
%endif
BuildRequires: python-rpm-macros
BuildRequires: %{python_module Cython >= 0.19}
BuildRequires: %{python_module devel}
BuildRequires: %{python_module numpy-devel >= 1.5.1}
BuildRequires: %{python_module setuptools}
Requires: python-numpy >= 1.5.1
%python_subpackages
%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
%setup -q -n scipy-%{version}
%patch0 -p1
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
export CFLAGS="%{optflags} -fno-strict-aliasing"
export FFTW=%{_libdir}
export BLAS=%{_libdir}
export LAPACK=%{_libdir}
%if %{with openblas}
export OPENBLAS=%{_libdir}
%endif
%python_exec setup.py config_fc --fcompiler=gnu95 --noarch build
%install
%python_install
%python_expand %fdupes %{buildroot}%{$python_sitearch}
%files %{python_files}
%defattr(-,root,root,-)
%license LICENSE.txt
%{python_sitearch}/scipy/
%{python_sitearch}/scipy-*-py*.egg-info
%changelog