File python-pyamg.spec of Package python-pyamg

#
# spec file for package python-pyamg
#
# Copyright (c) 2017 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/
#


%bcond_without test

%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name:           python-pyamg
Version:        3.2.1
Release:        0
Summary:        A python module and library of AMG solvers
License:        BSD-3-Clause
Group:          Development/Libraries/Python
Url:            https://github.com/pyamg/pyamg
Source:         https://files.pythonhosted.org/packages/source/p/pyamg/pyamg-%{version}.tar.gz
BuildRequires:  gcc-c++
BuildRequires:  fdupes
BuildRequires:  python-rpm-macros
BuildRequires:  %{python_module devel}
BuildRequires:  %{python_module setuptools}
BuildRequires:  %{python_module Pygments}
BuildRequires:  %{python_module numpy-devel >= 1.7.0}
BuildRequires:  %{python_module scipy >= 0.12.0}
%if %{with test}
BuildRequires:  %{python_module pytest >= 2}
%endif
Requires:       python-numpy >= 1.7.0
Requires:       python-scipy >= 0.12.0
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
%python_subpackages

%description
PyAMG is a library of Algebraic Multigrid (AMG) solvers with a convenient
Python interface.

%prep
%setup -q -n pyamg-%{version}

%build
export CFLAGS="%{optflags} -fpermissive"
%python_build

%install
%python_install
%python_expand %fdupes %{buildroot}%{$python_sitearch}

%if %{with test}
%check
%python_exec setup.py test
%endif

%files %{python_files}
%defattr(-,root,root)
%doc LICENSE.txt README.md
%{python_sitearch}/pyamg/
%{python_sitearch}/pyamg-%{version}-py*.egg-info

%changelog
openSUSE Build Service is sponsored by