Blob Blame History Raw
# make main package noarch to run tests on all arches
# but the package is actually noarch, so don't generate debuginfo
%global debug_package %{nil}

%global desc %{expand: \
Nilearn is a Python module for fast and easy statistical learning on
NeuroImaging data.

It leverages the scikit-learn Python toolbox for multivariate statistics with
applications such as predictive modelling, classification, decoding, or
connectivity analysis.

This work is made available by a community of people, amongst which the INRIA
Parietal Project Team and the scikit-learn folks, in particular P. Gervais, A.
Abraham, V. Michel, A. Gramfort, G. Varoquaux, F. Pedregosa, B. Thirion, M.
Eickenberg, C. F. Gorgolewski, D. Bzdok, L. Esteve and B. Cipollini.

Detailed documentation is available at}

Name:           python-nilearn
Version:        0.9.1
Release:        %autorelease
Summary:        Python module for fast and easy statistical learning on NeuroImaging data

License:        BSD
# Use GitHub tar: pypi does not include all test data

BuildRequires:  python3-devel
BuildRequires:  %{py3_dist pytest}

Recommends:  %{py3_dist matplotlib}


%package -n python3-nilearn
Summary:        %{summary}
BuildArch:      noarch

%description -n python3-nilearn

%autosetup -n nilearn-%{version}
# Remove shebangs
find . -name "*py" -exec sed -i '/#!\/usr\/bin\/env python/ d' '{}' \;
# Remove pre-compiled files
find . -name "*pyc" -exec rm -f '{}' \;

# Correct python command
sed -i 's/python/python3/' nilearn/plotting/
#sed -i 's/python/python3/' nilearn/plotting/glass_brain_files/

%pyproject_buildrequires -r


# Documentation also fetches imaging data set from online sources, so we cannot
# generate it. We include the link to the documentation in the description.

%pyproject_save_files nilearn


%ifarch s390x %{power64} %{arm64} %{arm32} %{ix86}
k="${k:-}${k:+ and} not test_load_confounds"

%{pytest} -k "${k:-}" nilearn

%files -n python3-nilearn -f %{pyproject_files}
%doc AUTHORS.rst README.rst