File python-nibabel.spec of Package python-nibabel-snapshot

%define modname nibabel
Name:           python-%{modname}-snapshot
Summary:        Access a multitude of neuroimaging data formats
Release:        1
License:        MIT License
Group:          Development/Libraries/Python
Conflicts:      python-nibabel
# should be here, but doesn't really work
#BuildArch:      noarch
Source:         %{modname}-snapshot-%{version}.tar.gz
BuildRoot:      %{_tmppath}/%{name}-%{version}-root
%if %{defined fedora_version} || %{defined rhel_version} || %{defined centos_version}
BuildRequires:  numpy
Requires:       numpy
%if %{defined fedora_version}
BuildRequires:  atlas lapack
# SUSE-related stuff
BuildRequires:  fdupes
BuildRequires:  python-numpy python-numpy-devel
Requires:       python-numpy
BuildRequires:  python-devel python-nose


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

export CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing"
python build
%if 0%{?centos_version} < 600 || 0%{?rhel_version} < 600
echo "Not running unittests: Python 2.4 cannot run them."
PYTHONPATH=.:$(PYTHONPATH) nosetests nibabel

python install --prefix=%{_prefix} --root=$RPM_BUILD_ROOT --record=INSTALLED_FILES
%if %{defined suse_version}
# save some space
%fdupes $RPM_BUILD_ROOT%{py_sitedir}

rm -rf %{buildroot}


%if 0%{?suse_version} >= 1100

* Wed Feb 3 2010 - Michael Hanke <> -
- Initial release