File python-mvpa.spec of Package python-mvpa

#
# spec file for package python-mvpa
#
# 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/
#


%define pyname  mvpa
%define modname py%{pyname}
Name:           python-%{pyname}
Version:        0.4.7
Release:        0
Summary:        Multivariate pattern analysis
License:        MIT
Group:          Development/Libraries/Python
Url:            http://www.pymvpa.org/
Source:         http://alioth.debian.org/frs/download.php/3525/%{modname}_%{version}.tar.gz
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
%if 0%{?fedora_version}
BuildRequires:  atlas
%endif
%if 0%{?centos_version} && 0%{?centos_version} < 600 || 0%{?rhel_version} && 0%{?rhel_version} < 600
BuildRequires:  python-ctypes
Requires:       python-ctypes
%endif
%if 0%{?suse_version}
# SUSE-related stuff
BuildRequires:  python-numpy-devel
%{py_requires}
%endif
BuildRequires:  fdupes
BuildRequires:  gcc-c++
BuildRequires:  python-numpy
BuildRequires:  python-devel
BuildRequires:  python-nose
BuildRequires:  python-setuptools
BuildRequires:  swig
%if 0%{?suse_version} > 1130
BuildRequires:  lapack-devel
%else
BuildRequires:  lapack
%endif
Requires:       python-numpy

%description
PyMVPA is a Python module intended to ease pattern classification analyses of
large datasets. It provides high-level abstraction of typical processing steps
and a number of implementations of some popular algorithms. While it is not
limited to neuroimaging data it is eminently suited for such datasets.  PyMVPA
is truely free software (in every respect) and additionally requires nothing
but free-software to run.

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

%build
export CFLAGS="%{optflags} -fno-strict-aliasing"
make 3rd
python setup.py build
MVPA_TESTS_LOWMEM=yes MVPA_TESTS_QUICK=yes MVPA_TESTS_LABILE=no make unittest

%install
python setup.py install --prefix=%{_prefix} --root=%{buildroot}
%if 0%{?suse_version}
%fdupes -s %{buildroot}
%endif
# force byte compiling to avoid rpmlint warning and later recompilation
%py_compile %{buildroot}%{py_sitedir}/%{pyname}

%clean
rm -rf %{buildroot}

%files
%defattr(-,root,root,-)
%attr(0755, root, root) %{_bindir}/atlaslabeler
%attr(0755, root, root) %{_bindir}/mvpa-prep-fmri
%{py_sitedir}/%{pyname}/
%{py_sitedir}/%{modname}-%{version}-py%{py_ver}.egg-info

%changelog
openSUSE Build Service is sponsored by