File python-MDP.spec of Package python-MDP
#
# spec file for package python-MDP
#
# 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/
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%define oldpython python
%bcond_with test
Name: python-MDP
Version: 3.5
Release: 0
License: BSD-3-Clause
Summary: A Python library for building complex data processing software
Url: http://mdp-toolkit.sourceforge.net/
Source: https://files.pythonhosted.org/packages/source/M/MDP/MDP-%{version}.tar.gz
Group: Development/Languages/Python
BuildRequires: %{python_module devel}
BuildRequires: %{python_module future}
BuildRequires: %{python_module joblib >= 0.4.3}
BuildRequires: %{python_module numpy-devel >= 1.1}
BuildRequires: %{python_module scipy >= 0.5.2}
BuildRequires: %{python_module scikit-learn >= 0.6}
BuildRequires: %{python_module setuptools}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
%if %{with test}
BuildRequires: %{python_module pytest}
%endif
Requires: python-future
Requires: python-numpy >= 1.1
Recommends: python-joblib >= 0.4.3
Recommends: python-scipy >= 0.5.2
Recommends: python-scikit-learn >= 0.6
%ifpython2
Obsoletes: %{oldpython}-mdp < %{version}
Provides: %{oldpython}-mdp = %{version}
%endif
%ifpython3
Obsoletes: python3-mdp < %{version}
Provides: python3-mdp = %{version}
%endif
BuildArch: noarch
%python_subpackages
%description
The Modular toolkit for Data Processing (MDP) package is a library
of widely used data processing algorithms, and the possibility to
combine them together to form pipelines for building more complex
data processing software.
MDP has been designed to be used as-is and as a framework for
scientific data processing development.
%prep
%setup -q -n MDP-%{version}
%build
%python_build
%install
%python_install
%{python_expand %fdupes %{buildroot}%{$python_sitelib}
$python -m compileall -d %{$python_sitelib} %{buildroot}%{$python_sitelib}/mdp/test/
$python -O -m compileall -d %{$python_sitelib} %{buildroot}%{$python_sitelib}/mdp/test/
%fdupes %{buildroot}%{$python_sitelib}/mdp/test/
}
%if %{with test}
%check
%python_exec -B -m pytest mdp
%endif
%files %{python_files}
%defattr(-,root,root,-)
%doc CHANGES COPYRIGHT README TODO
%{python_sitelib}/bimdp/
%{python_sitelib}/mdp/
%{python_sitelib}/MDP-%{version}-py*.egg-info
%changelog