a7eb98c
%global srcname     nixio
a7eb98c
%global sum     Python bindings for NIX
a7eb98c
a7eb98c
Name:       python-%{srcname}
4b5b614
Version:    1.4.5
8e8ed3a
Release:    2%{?dist}
a7eb98c
Summary:    %{sum}
a7eb98c
a7eb98c
License:    BSD
a7eb98c
URL:        https://github.com/G-node/nixpy
a7eb98c
Source0:    https://github.com/G-node/nixpy/archive/%{version}/%{name}-%{version}.tar.gz
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
a7eb98c
%package -n python2-%{srcname}
a7eb98c
Summary:        %{sum}
a7eb98c
BuildRequires:  python2-devel
a7eb98c
BuildRequires:  %{py2_dist pytest numpy h5py pytest-runner}
a7eb98c
Requires:       %{py2_dist numpy h5py}
a7eb98c
%{?python_provide:%python_provide python2-%{srcname}}
a7eb98c
a7eb98c
%description -n python2-%{srcname}
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
a7eb98c
a7eb98c
%package -n python3-%{srcname}
a7eb98c
Summary:        %{sum}
a7eb98c
BuildRequires:  python3-devel
a7eb98c
BuildRequires:  %{py3_dist pytest numpy h5py pytest-runner}
a7eb98c
Requires:       %{py3_dist numpy h5py}
a7eb98c
%{?python_provide:%python_provide python3-%{srcname}}
a7eb98c
a7eb98c
%description -n python3-%{srcname}
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
a7eb98c
%package doc
a7eb98c
Summary:        %{sum}
a7eb98c
BuildRequires:  python3-sphinx
a7eb98c
a7eb98c
%description doc
a7eb98c
Documentation files for %{name}.
a7eb98c
a7eb98c
%prep
a7eb98c
%autosetup -n nixpy-%{version}
a7eb98c
rm -fr *egg-info
a7eb98c
a7eb98c
%build
a7eb98c
%py2_build
a7eb98c
%py3_build
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
a7eb98c
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
a7eb98c
%py2_install
a7eb98c
%py3_install
a7eb98c
a7eb98c
%check
a7eb98c
%{__python2} setup.py test
a7eb98c
%{__python3} setup.py test
a7eb98c
a7eb98c
%files -n python2-%{srcname}
a7eb98c
%license LICENSE
a7eb98c
%{python2_sitelib}/%{srcname}-%{version}-py?.?.egg-info
a7eb98c
%{python2_sitelib}/%{srcname}/
a7eb98c
a7eb98c
%files -n python3-%{srcname}
a7eb98c
%license LICENSE
a7eb98c
%{python3_sitelib}/%{srcname}-%{version}-py?.?.egg-info
a7eb98c
%{python3_sitelib}/%{srcname}/
a7eb98c
a7eb98c
%files doc
a7eb98c
%doc README.rst html
a7eb98c
%license LICENSE
a7eb98c
a7eb98c
%changelog
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