97 lines
2.3 KiB
RPMSpec
97 lines
2.3 KiB
RPMSpec
%global forgeurl https://github.com/G-node/nixpy
|
|
|
|
Name: python-nixio
|
|
Version: 1.5.3
|
|
Release: %autorelease
|
|
Summary: Python bindings for NIX
|
|
|
|
%global tag %version
|
|
%forgemeta
|
|
|
|
License: BSD
|
|
URL: %forgeurl
|
|
Source0: %forgesource
|
|
# The tagged snapshot on GitHub still says "dev" but the manually uploaded
|
|
# release does not, so use the info.json from there
|
|
# https://github.com/G-Node/nixpy/issues/528
|
|
Source1: info.json
|
|
|
|
|
|
BuildArch: noarch
|
|
# No need for nix, they're uncoupling it from the C++
|
|
# https://github.com/G-Node/nixpy/pull/276
|
|
|
|
%description
|
|
The NIX project started as an initiative within the Electrophysiology Task
|
|
Force a part of the INCF Data sharing Program. The NIX data model allows to
|
|
store fully annotated scientific data-set, i.e. the data together with its
|
|
metadata within the same container. Our aim is to achieve standardization by
|
|
providing a common/generic data structure for a multitude of data types. See
|
|
the wiki for more information
|
|
|
|
The current implementations store the actual data using the HDF5 file format as
|
|
a storage backend.
|
|
|
|
%package -n python3-nixio
|
|
Summary: %{summary}
|
|
BuildRequires: python3-devel
|
|
BuildRequires: gcc
|
|
# use tests_require which is deprecated
|
|
BuildRequires: %{py3_dist pytest}
|
|
BuildRequires: %{py3_dist pytest-runner}
|
|
BuildRequires: %{py3_dist scipy}
|
|
BuildRequires: %{py3_dist pillow}
|
|
BuildRequires: %{py3_dist matplotlib}
|
|
|
|
%description -n python3-nixio
|
|
%{description}
|
|
|
|
%package doc
|
|
Summary: %{summary}
|
|
BuildRequires: python3-sphinx
|
|
BuildRequires: python3-sphinx_rtd_theme
|
|
|
|
%description doc
|
|
Documentation files for %{name}.
|
|
|
|
%prep
|
|
%forgesetup
|
|
|
|
# it sets examples_path based on the name of the cwd
|
|
sed -i "s/nixpy/nixpy-%{version}/" nixio/test/test_doc_examples.py
|
|
|
|
cp %{SOURCE1} nixio/info.json -v -p
|
|
|
|
%generate_buildrequires
|
|
%pyproject_buildrequires -r
|
|
|
|
%build
|
|
%pyproject_wheel
|
|
|
|
PYTHONPATH=. sphinx-build-3 docs/source html
|
|
# Remove unneeded files
|
|
rm -fr html/.{buildinfo,doctrees}
|
|
|
|
# Remove shebang from documentation examples
|
|
for f in html/_downloads/*/*.py; do
|
|
sed '1{\@^#!/usr/bin/env python@d}' $f > $f.new &&
|
|
touch -r $f $f.new &&
|
|
mv $f.new $f
|
|
done
|
|
|
|
%install
|
|
%pyproject_install
|
|
%pyproject_save_files nixio
|
|
|
|
%check
|
|
%{pytest}
|
|
|
|
%files -n python3-nixio -f %{pyproject_files}
|
|
%{_bindir}/nixio
|
|
|
|
%files doc
|
|
%doc README.rst html
|
|
%license LICENSE
|
|
|
|
%changelog
|
|
%autochangelog
|