diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..1d1c931 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/python-nistats-0.0.1.tar.gz diff --git a/python-nistats.spec b/python-nistats.spec new file mode 100644 index 0000000..2227121 --- /dev/null +++ b/python-nistats.spec @@ -0,0 +1,130 @@ +# Py3 only as some deps are not provided for py2 any more + +# Also test in mock since a test that downloads data is disabled in the spec +# mock -r fedora-rawhide-x86_64 rebuild --enable-network --rpmbuild-opts="--with tests" +%bcond_without tests + +# Require downloads, so we cannot generate them +%bcond_with doc + +%global pypi_name nistats + +%global desc %{expand: \ +Nistats is a Python module for fast and easy modeling and statistical analysis +of functional Magnetic Resonance Imaging data. + +It leverages the nilearn Python toolbox for neuroimaging data manipulation +(data downloading, visualization, masking). + +This work is made available by a community of people, amongst which the INRIA +Parietal Project Team and D'esposito lab at Berkeley. + +It is based on developments initiated in the nipy project.} + + +Name: python-%{pypi_name} +Version: 0.0.1 +Release: 0.1b0%{?dist} +Summary: Modeling and Statistical analysis of fMRI data in Python + +License: BSD +URL: https://nistats.github.io/ +Source0: https://github.com/%{pypi_name}/%{pypi_name}/archive/rel%{version}b/%{name}-%{version}.tar.gz + +BuildArch: noarch + +%{?python_enable_dependency_generator} + +%description +%{desc} + +%package -n python3-%{pypi_name} +Summary: %{summary} +BuildRequires: python3-devel +BuildRequires: %{py3_dist numpy} >= 1.11 +BuildRequires: %{py3_dist nibabel} >= 2.0.2 +BuildRequires: %{py3_dist scipy} >= 0.17 +BuildRequires: %{py3_dist scikit-learn} >= 0.18 +BuildRequires: %{py3_dist nilearn} >= 0.4 +BuildRequires: %{py3_dist pandas} >= 0.18.0 +BuildRequires: %{py3_dist patsy} >= 0.4.1 +BuildRequires: %{py3_dist nose} >= 1.2.1 +BuildRequires: %{py3_dist six} +BuildRequires: %{py3_dist pytz} +BuildRequires: %{py3_dist matplotlib} >= 1.5.1 +BuildRequires: %{py3_dist boto3} >= 1.4.0 +# For documentation +%if %{with doc} +BuildRequires: %{py3_dist sphinx} +BuildRequires: %{py3_dist numpydoc} +BuildRequires: %{py3_dist sphinx-gallery} +BuildRequires: %{py3_dist pillow} +%endif + +# Not in setup.py +Requires: %{py3_dist six} + +Recommends: %{py3_dist matplotlib} >= 1.5.1 +Recommends: %{py3_dist boto3} >= 1.4.0 +%{?python_provide:%python_provide python3-%{pypi_name}} + +%description -n python3-%{pypi_name} +%{desc} + +%package doc +Summary: %{summary} + +%description doc +Documentation for %{name}. + +%prep +%autosetup -n %{pypi_name}-rel%{version}b +rm -rf %{pypi_name}.egg-info + +# remove bundled numpydoc and sphinx_gallery +rm -rf ./doc/sphinxext/numpydoc +rm -rf ./doc/sphinxext/sphinx_gallery + +find . -type f -name "*.py" -exec sed -i '/^#![ ]*\/usr\/bin\/env.*$/ d' {} 2>/dev/null ';' + +%build +%py3_build + +%if %{with doc} +pushd doc + make SPHINXBUILD=sphinx-build-3 html + rm -rf _build/html/.doctrees + rm -rf _build/html/.buildinfo +popd +%endif + +%install +%py3_install + +%check +%if %{with tests} +# ignore dataset tests that tries to download data +nosetests-%{python3_version} -i test_datasets +%endif + +%files -n python3-%{pypi_name} +%license LICENSE +%doc README.rst AUTHORS.rst +%{python3_sitelib}/%{pypi_name}-%{version}b0-py3.?.egg-info +%{python3_sitelib}/%{pypi_name} + +%files doc +%license LICENSE +%doc examples +%if %{with doc} +%doc doc/_build/html +%endif + +%changelog +* Fri Dec 14 2018 Ankur Sinha - 0.0.1-0.1b0 +- Update BRs +- Correct description +- Initial build +- Enable tests +- Remove bundled bits +- Correct pre-release tag diff --git a/sources b/sources new file mode 100644 index 0000000..86cfd78 --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (python-nistats-0.0.1.tar.gz) = a41bdd355df2ebc85406a6c3b677526047602651a5deecb989f1995d2e12c3a8706eae02dabc0e5dc4dd4a489cfd4640f4f7b477649e31a3cf565e8b76f3dbdf