59a70b2
%global forgeurl    https://github.com/G-node/nixpy
a7eb98c
59a70b2
Name:       python-nixio
ba6b571
Version:    1.5.2
646d9c4
Release:    2%{?dist}
adc1676
Summary:    Python bindings for NIX
15c4f7a
15c4f7a
%global     tag     %version
59a70b2
%forgemeta
a7eb98c
a7eb98c
License:    BSD
15c4f7a
URL:        %forgeurl
15c4f7a
Source0:    %forgesource
59a70b2
# The tagged snapshot on GitHub still says "dev" but the manually uploaded
59a70b2
# release does not, so use the info.json from there
59a70b2
# https://github.com/G-Node/nixpy/issues/528
59a70b2
Source1:    info.json
a7eb98c
a7eb98c
a7eb98c
BuildArch:      noarch
a7eb98c
# No need for nix, they're uncoupling it from the C++
a7eb98c
# https://github.com/G-Node/nixpy/pull/276
a7eb98c
a7eb98c
%description
a7eb98c
The NIX project started as an initiative within the Electrophysiology Task
a7eb98c
Force a part of the INCF Data sharing Program. The NIX data model allows to
a7eb98c
store fully annotated scientific data-set, i.e. the data together with its
a7eb98c
metadata within the same container. Our aim is to achieve standardization by
a7eb98c
providing a common/generic data structure for a multitude of data types. See
a7eb98c
the wiki for more information
a7eb98c
a7eb98c
The current implementations store the actual data using the HDF5 file format as
a7eb98c
a storage backend.
a7eb98c
59a70b2
%package -n python3-nixio
adc1676
Summary:        %{summary}
a7eb98c
BuildRequires:  python3-devel
469ce67
BuildRequires:  gcc
59a70b2
# use tests_require which is deprecated
0ea8710
BuildRequires:  %{py3_dist pytest}
0ea8710
BuildRequires:  %{py3_dist pytest-runner}
59a70b2
BuildRequires:  %{py3_dist scipy}
59a70b2
BuildRequires:  %{py3_dist pillow}
59a70b2
BuildRequires:  %{py3_dist matplotlib}
a7eb98c
59a70b2
%description -n python3-nixio
59a70b2
%{description}
a7eb98c
a7eb98c
%package doc
adc1676
Summary:        %{summary}
a7eb98c
BuildRequires:  python3-sphinx
59a70b2
BuildRequires:  python3-sphinx_rtd_theme
a7eb98c
a7eb98c
%description doc
a7eb98c
Documentation files for %{name}.
a7eb98c
a7eb98c
%prep
59a70b2
%forgesetup
59a70b2
59a70b2
# it sets examples_path based on the name of the cwd
59a70b2
sed -i "s/nixpy/nixpy-%{version}/" nixio/test/test_doc_examples.py
59a70b2
59a70b2
cp %{SOURCE1} nixio/info.json -v -p
59a70b2
59a70b2
%generate_buildrequires
59a70b2
%pyproject_buildrequires -r
a7eb98c
a7eb98c
%build
59a70b2
%pyproject_wheel
a7eb98c
a7eb98c
PYTHONPATH=. sphinx-build-3 docs/source html
a7eb98c
# Remove unneeded files
a7eb98c
rm -fr html/.{buildinfo,doctrees}
a7eb98c
a7eb98c
# Remove shebang from documentation examples
5ae2757
for f in html/_downloads/*/*.py; do
a7eb98c
    sed '1{\@^#!/usr/bin/env python@d}' $f > $f.new &&
a7eb98c
    touch -r $f $f.new &&
a7eb98c
    mv $f.new $f
a7eb98c
done
a7eb98c
a7eb98c
%install
59a70b2
%pyproject_install
59a70b2
%pyproject_save_files nixio
a7eb98c
a7eb98c
%check
59a70b2
%{pytest}
a7eb98c
59a70b2
%files -n python3-nixio -f %{pyproject_files}
59a70b2
%{_bindir}/nixio
a7eb98c
a7eb98c
%files doc
a7eb98c
%doc README.rst html
a7eb98c
%license LICENSE
a7eb98c
a7eb98c
%changelog
646d9c4
* Fri Jan 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.5.2-2
646d9c4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
646d9c4
ba6b571
* Thu Dec 30 2021 Vanessa Christopher <vanessaigwe1@gmail.com> - 1.5.2-1
ba6b571
- Update to latest release
ba6b571
e20c390
* Sun Oct 03 2021 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 1.5.1-1
e20c390
- Update to latest release
59a70b2
e71fb19
* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.4.9-14
e71fb19
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
e71fb19
f5133ef
* Fri Jun 04 2021 Python Maint <python-maint@redhat.com> - 1.4.9-13
f5133ef
- Rebuilt for Python 3.10
f5133ef
d7b42b3
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.4.9-12
d7b42b3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
d7b42b3
cbbb427
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.4.9-11
cbbb427
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
cbbb427
0ea8710
* Thu Jun 25 2020 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 1.4.9-10
0ea8710
- Explicitly BR setuptools
0ea8710
8f136a3
* Tue May 26 2020 Miro Hrončok <mhroncok@redhat.com> - 1.4.9-9
8f136a3
- Rebuilt for Python 3.9
8f136a3
6d59f71
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.4.9-8
6d59f71
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
6d59f71
95b43cf
* Thu Oct 03 2019 Miro Hrončok <mhroncok@redhat.com> - 1.4.9-7
95b43cf
- Rebuilt for Python 3.8.0rc1 (#1748018)
95b43cf
d28fe34
* Mon Aug 19 2019 Miro Hrončok <mhroncok@redhat.com> - 1.4.9-6
d28fe34
- Rebuilt for Python 3.8
d28fe34
999c9e4
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.4.9-5
999c9e4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
999c9e4
5ae2757
* Wed Jul 10 2019 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 1.4.9-4
5ae2757
- Fix build: rhbz 1706159
5ae2757
0249f38
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.4.9-3
0249f38
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
0249f38
11d4cae
* Tue Jan 15 2019 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 1.4.9-2
11d4cae
- Enable python dependency generator
11d4cae
2b45136
* Sat Jan 12 2019 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 1.4.9-1
2b45136
- Update to 1.4.9
2b45136
b65ad55
* Thu Oct 18 2018 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 1.4.6-2
b65ad55
- Subpackage python2-nixio has been removed
b65ad55
  See https://fedoraproject.org/wiki/Changes/Mass_Python_2_Package_Removal
b65ad55
9bef11d
* Wed Jul 18 2018 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 1.4.6-1
9bef11d
- Update to 1.4.6
9bef11d
22a509f
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.4.5-3
22a509f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
22a509f
8e8ed3a
* Tue Jun 19 2018 Miro Hrončok <mhroncok@redhat.com> - 1.4.5-2
8e8ed3a
- Rebuilt for Python 3.7
8e8ed3a
4b5b614
* Sat Jun 09 2018 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 1.4.5-1
4b5b614
- Update to latest upstream release
4b5b614
78901b9
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.4.3-2
78901b9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
78901b9
a7eb98c
* Sun Jan 21 2018 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 1.4.3-1
a7eb98c
- Use newer release and GitHub sources
a7eb98c
- Run tests
a7eb98c
- Define summary macro
a7eb98c
- Add doc sub package
a7eb98c
a7eb98c
* Fri Jan 12 2018 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 1.4.2-1
a7eb98c
- Initial build
a7eb98c
- use pydist macro