Blob Blame History Raw
%{?python_enable_dependency_generator}
%global modname moss

Name:           python-%{modname}
Version:        0.5.0
Release:        1%{?dist}
Summary:        Assorted utilities for neuroimaging and cognitive science

# moss/external/mvpasurf.py is MIT
License:        BSD and MIT
URL:            https://github.com/mwaskom/moss
Source0:        https://github.com/mwaskom/moss/archive/v%{version}/%{modname}-%{version}.tar.gz
Patch0001:      0001-put-real-dependencies-into-metadata.patch
Patch0002:      0002-remove-use-of-deprecated-removed-scipy.stats.ss.patch
Patch0003:      0003-bunch-munch.patch

BuildArch:      noarch

%description
Moss is a library of functions, classes, and scripts to that may be useful for
analyzing scientific data. Because this package is developed for neuroimaging
and cognitive science, there is probably some bias towards applications that
are useful in that domain. However, the functions are intended to be written
in as general and lightweight a fashion as possible.

%package -n python2-%{modname}
Summary:        %{summary}
%{?python_provide:%python_provide python2-%{modname}}
Provides:       bundled(PyMVPA)
BuildRequires:  python2-devel
BuildRequires:  python2-setuptools
# install_requires
BuildRequires:  python2dist(matplotlib)
BuildRequires:  python2dist(munch)
BuildRequires:  python2dist(numpy)
BuildRequires:  python2dist(nibabel)
BuildRequires:  python2dist(pandas)
BuildRequires:  python2dist(scikit-learn)
BuildRequires:  python2dist(scipy)
BuildRequires:  python2dist(seaborn)
BuildRequires:  python2dist(six)
# tests_require
BuildRequires:  python2dist(nose)
BuildRequires:  python2dist(pytest)

%description -n python2-%{modname}
Moss is a library of functions, classes, and scripts to that may be useful for
analyzing scientific data. Because this package is developed for neuroimaging
and cognitive science, there is probably some bias towards applications that
are useful in that domain. However, the functions are intended to be written
in as general and lightweight a fashion as possible.

Python 2 version.

%package -n python3-%{modname}
Summary:        %{summary}
%{?python_provide:%python_provide python3-%{modname}}
Provides:       bundled(PyMVPA)
BuildRequires:  python3-devel
BuildRequires:  python3-setuptools
# install_requires
BuildRequires:  python3dist(matplotlib)
BuildRequires:  python2dist(munch)
BuildRequires:  python3dist(numpy)
BuildRequires:  python3dist(nibabel)
BuildRequires:  python3dist(pandas)
BuildRequires:  python3dist(scikit-learn)
BuildRequires:  python3dist(scipy)
BuildRequires:  python3dist(seaborn)
BuildRequires:  python3dist(six)
# tests_require
BuildRequires:  python3dist(nose)
BuildRequires:  python3dist(pytest)

%description -n python3-%{modname}
Moss is a library of functions, classes, and scripts to that may be useful for
analyzing scientific data. Because this package is developed for neuroimaging
and cognitive science, there is probably some bias towards applications that
are useful in that domain. However, the functions are intended to be written
in as general and lightweight a fashion as possible.

Python 3 version.

%prep
%autosetup -n %{modname}-%{version} -p1
rm -vf licenses/BUNCH_LICENSE moss/external/bunch.py

%build
%py2_build
%py3_build

%install
%py2_install
%py3_install

# Depends on 'freeview' utility
rm -vf %{buildroot}%{_bindir}/recon_qc

%check
PYTHONPATH=%{buildroot}%{python2_sitelib} py.test-%{python2_version} -v
PYTHONPATH=%{buildroot}%{python2_sitelib} py.test-%{python3_version} -v

%files -n python2-%{modname}
%license LICENSE licenses/*
%doc README.md
%{python2_sitelib}/%{modname}*

%files -n python3-%{modname}
%license LICENSE licenses/*
%doc README.md
%{_bindir}/check_mni_reg
%{_bindir}/recon_status
%{_bindir}/recon_movie
%{_bindir}/recon_process_stats
%{_bindir}/ts_movie
%{_bindir}/warp_qc
%{python3_sitelib}/%{modname}*

%changelog
* Sun Feb 11 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 0.5.0-1
- Update to 0.5.0

* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.3.4-12
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild

* Thu Jan 25 2018 Iryna Shcherbina <ishcherb@redhat.com> - 0.3.4-11
- Update Python 2 dependency declarations to new packaging standards
  (See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3)

* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.3.4-10
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild

* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.3.4-9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild

* Mon Dec 19 2016 Miro HronĨok <mhroncok@redhat.com> - 0.3.4-8
- Rebuild for Python 3.6

* Mon Sep 26 2016 Dominik Mierzejewski <rpm@greysector.net> - 0.3.4-7
- rebuilt for matplotlib-2.0.0

* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3.4-6
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages

* Thu Jun 16 2016 Igor Gnatenko <ignatenko@redhat.com> - 0.3.4-5
- Python3 binaries should require only python3 (RHBZ #1342502)

* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.3.4-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild

* Sun Dec 06 2015 Igor Gnatenko <i.gnatenko.brain@gmail.com> - 0.3.4-3
- Fix according review

* Wed Nov 25 2015 Igor Gnatenko <i.gnatenko.brain@gmail.com> - 0.3.4-2
- Provide only one version of binaries (py3)

* Thu Nov 05 2015 Igor Gnatenko <i.gnatenko.brain@gmail.com> - 0.3.4-1
- Initial package