ef51899
# make main package noarch to run tests on all arches
ef51899
# but the package is actually noarch, so don't generate debuginfo
ef51899
%global debug_package %{nil}
ef51899
7c766bb
%global desc %{expand: \
7c766bb
Nilearn is a Python module for fast and easy statistical learning on
7c766bb
NeuroImaging data.
7c766bb
7c766bb
It leverages the scikit-learn Python toolbox for multivariate statistics with
7c766bb
applications such as predictive modelling, classification, decoding, or
7c766bb
connectivity analysis.
7c766bb
7c766bb
This work is made available by a community of people, amongst which the INRIA
7c766bb
Parietal Project Team and the scikit-learn folks, in particular P. Gervais, A.
7c766bb
Abraham, V. Michel, A. Gramfort, G. Varoquaux, F. Pedregosa, B. Thirion, M.
7c766bb
Eickenberg, C. F. Gorgolewski, D. Bzdok, L. Esteve and B. Cipollini.
7c766bb
7c766bb
Detailed documentation is available at http://nilearn.github.io/.}
7c766bb
60d19f0
Name:           python-nilearn
783a2a2
Version:        0.9.1
60d19f0
Release:        %autorelease
7c766bb
Summary:        Python module for fast and easy statistical learning on NeuroImaging data
7c766bb
7c766bb
License:        BSD
60d19f0
URL:            https://pypi.python.org/pypi/nilearn
783a2a2
# Use GitHub tar: pypi does not include all test data
783a2a2
Source0:        https://github.com/nilearn/nilearn/archive/%{version}/%{name}-%{version}.tar.gz
7c766bb
4ecc1e8
7c766bb
BuildRequires:  python3-devel
60d19f0
BuildRequires:  %{py3_dist pytest}
60d19f0
7c766bb
Recommends:  %{py3_dist matplotlib}
7c766bb
7c766bb
%description
7c766bb
%{desc}
7c766bb
60d19f0
%package -n python3-nilearn
7c766bb
Summary:        %{summary}
ef51899
BuildArch:      noarch
7c766bb
60d19f0
%description -n python3-nilearn
7c766bb
%{desc}
7c766bb
7c766bb
%prep
0a53500
%autosetup -n nilearn-%{version}
7c766bb
# Remove shebangs
7c766bb
find . -name "*py" -exec sed -i '/#!\/usr\/bin\/env python/ d' '{}' \;
7c766bb
# Remove pre-compiled files
7c766bb
find . -name "*pyc" -exec rm -f '{}' \;
7c766bb
60d19f0
# Correct python command
60d19f0
sed -i 's/python/python3/' nilearn/plotting/html_document.py
783a2a2
#sed -i 's/python/python3/' nilearn/plotting/glass_brain_files/generate_json.sh
60d19f0
60d19f0
%generate_buildrequires
60d19f0
%pyproject_buildrequires -r
60d19f0
7c766bb
%build
60d19f0
%pyproject_wheel
7c766bb
7c766bb
# Documentation also fetches imaging data set from online sources, so we cannot
7c766bb
# generate it. We include the link to the documentation in the description.
7c766bb
7c766bb
%install
60d19f0
%pyproject_install
60d19f0
%pyproject_save_files nilearn
7c766bb
7c766bb
%check
ef51899
ef51899
# https://github.com/nilearn/nilearn/issues/3232
783a2a2
%ifarch s390x %{power64} %{arm64} %{arm32} %{ix86}
783a2a2
k="${k:-}${k:+ and} not test_load_confounds"
ef51899
%endif
783a2a2
ef51899
%{pytest} -k "${k:-}" nilearn
7c766bb
60d19f0
%files -n python3-nilearn -f %{pyproject_files}
7c766bb
%doc AUTHORS.rst README.rst
7c766bb
7c766bb
%changelog
60d19f0
%autochangelog