Blob Blame History Raw
%global pypi_name pynwb

%global desc %{expand:
PyNWB is a Python package for working with NWB files. It provides a high-level
API for efficiently working with Neurodata stored in the NWB format.
https://pynwb.readthedocs.io/en/latest/}

Name:           python-%{pypi_name}
Version:        2.0.0
Release:        4%{?dist}
Summary:        PyNWB is a Python package for working with NWB files
License:        BSD
URL:            https://github.com/NeurodataWithoutBorders/pynwb
# Use the pypi tar because GitHub tar does not include the required git-submodules
Source0:        %{pypi_source}
BuildArch:      noarch

%{?python_enable_dependency_generator}

%description %{desc}

%package -n python3-%{pypi_name}
Summary:        %{summary}

BuildRequires:  python3-devel
BuildRequires:  python3-setuptools
BuildRequires:  python3-certifi
BuildRequires:  python3-chardet
BuildRequires:  python3-h5py
BuildRequires:  python3-idna
BuildRequires:  python3-numpy
BuildRequires:  python3-dateutil
BuildRequires:  python3-requests
BuildRequires:  python3-ruamel-yaml
BuildRequires:  python3-six
BuildRequires:  python3-urllib3
BUildRequires:  python3-pandas
BUildRequires:  python3-pytest
BuildRequires:  python3-hdmf

%description -n python3-%{pypi_name} %{desc}

%prep
%autosetup -n %{pypi_name}-%{version}
rm -rf %{pypi_name}.egg-info

# test_validate uses python instead of python3
sed -i 's|python|python3|' tests/validation/test_validate.py

%build
%py3_build

%install
%py3_install

%check
# do not run ros tests (--ros3)
export PYTHONPATH=".:%{buildroot}/%{python3_sitelib}:%{buildroot}/%{python3_sitearch}" 
# run unit tests using pytest so that we can exclude tests that fail etc., which is hard to do with the test.py script
# Disable test which fails on s390x on F34
%if 0%{?fedora} < 35 && "%{_host_cpu}" == "s390x" || "%{_host_cpu}" == "ppc64le"
%{pytest} tests/unit -k "not test_icephys_filtering_roundtrip"
%else
%{pytest} tests/unit
%endif
%{__python3} test.py --example --validation --integration --backwards

%files -n python3-%{pypi_name}
%license license.txt
%doc README.rst
%{python3_sitelib}/%{pypi_name}/
%{python3_sitelib}/%{pypi_name}-*.egg-info

%changelog
* Fri Aug 27 2021 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 2.0.0-4
- Also disable test on ppc64le where it fails too

* Fri Aug 27 2021 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 2.0.0-3
- Disable failing test on F34 only

* Fri Aug 27 2021 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 2.0.0-2
- Disable tests that fails on s390x

* Mon Aug 16 2021 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 2.0.0-1
- Update to latest release

* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.4.0-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild

* Fri Jun 04 2021 Python Maint <python-maint@redhat.com> - 1.4.0-3
- Rebuilt for Python 3.10

* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.4.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild

* Sat Aug 22 2020 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 1.4.0-1
- Update to 1.4.0

* Sun Aug 09 2020 Luis Bazan <lbazan@fedoraproject.org> - 1.3.3-1
- New upstream version

* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.1-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild

* Tue May 26 2020 Miro Hrončok <mhroncok@redhat.com> - 1.2.1-2
- Rebuilt for Python 3.9

* Sun Feb 16 2020 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 1.2.1-1
- Update to new release

* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.2-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild

* Thu Jan  9 2020 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 1.1.2-2
- Remove dependency on unittest2 (#1789200)

* Fri Oct 25 2019 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 1.1.2-1
- Update to 1.1.2

* Tue Sep 24 2019 Luis Bazan <lbazan@fedoraproject.org> - 1.1.0-2
- disable test

* Mon Sep 23 2019 Luis Bazan <lbazan@fedoraproject.org> - 1.1.0-1
- New upstream version

* Mon Aug 19 2019 Miro Hrončok <mhroncok@redhat.com> - 1.0.3-2
- Rebuilt for Python 3.8

* Thu Jul 25 2019 Luis Bazan <lbazan@fedoraproject.org> - 1.0.3-1
- New upstream version

* Mon Apr 22 2019 Luis Bazan <lbazan@fedoraproject.org> - 1.0.2-1
- New upstream version

* Mon Apr 15 2019 Luis Bazan <lbazan@fedoraproject.org> - 1.0.1-2
- remove py2

* Mon Apr 15 2019 Luis Bazan <lbazan@fedoraproject.org> - 1.0.1-1
- New upstream version

* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.6.1-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild

* Mon Nov 26 2018 Luis Bazan <lbazan@fedoraproject.org> - 0.6.1-3
- Add buildrequires
- Enable tests (thanks Ankur)

* Mon Nov 26 2018 Luis Bazan <lbazan@fedoraproject.org> - 0.6.1-2
- Fix comment 2 in BZ 1651365

* Mon Nov 26 2018 Luis Bazan <lbazan@fedoraproject.org> - 0.6.1-1
- New upstream