# No support for Python 3 atm. # https://github.com/nsdf/nsdf/issues/42 %global with_python3 0 Name: python-nsdf Version: 0.0 %global commit 9621ced6230d6c25e712ed6a5b894448821ad7fa %global shortcommit %(c=%{commit}; echo ${c:0:7}) Release: 2.git%{shortcommit}%{?dist} Summary: Support library for the Neuroscience Simulation Data Format License: GPLv3+ URL: https://github.com/nsdf/nsdf Source0: https://github.com/nsdf/nsdf/archive/%{?commit}.tar.gz#/%{name}-%{commit}.tar.gz BuildArch: noarch BuildRequires: python2-devel BuildRequires: python2-nose BuildRequires: h5py BuildRequires: numpy %if 0%{with_python3} BuildRequires: python3-h5py BuildRequires: python3-numpy BuildRequires: python3-devel BuildRequires: python3-nose %endif BuildRequires: python-sphinx %if 0%{fedora} < 24 BuildRequires: python-sphinxcontrib-napoleon %endif %description NSDF (Neuroscience Simulation Data Format) is a file format built on top of HDF5 to store the results of computer simulation experiments. %{name} provides a python module to read and write files in the NSDF format. %package -n python2-nsdf Summary: %{summary} Requires: h5py Requires: numpy %{?python_provide:%python_provide python2-nsdf} %description -n python2-nsdf NSDF (Neuroscience Simulation Data Format) is a file format built on top of HDF5 to store the results of computer simulation experiments. %{name} provides a python module to read and write files in the NSDF format. %if 0%{with_python3} %package -n python3-nsdf Summary: %{summary} Requires: python3-h5py Requires: python3-numpy %{?python_provide:%python_provide python3-nsdf} %description -n python3-nsdf NSDF (Neuroscience Simulation Data Format) is a file format built on top of HDF5 to store the results of computer simulation experiments. %{name} provides a python module to read and write files in the NSDF format. %endif %package doc Summary: HTML documentation for %{name} %description doc %{summary}. %prep %autosetup -n nsdf-%{commit} -p1 %build export LC_CTYPE=en_US.utf8 %py2_build %if 0%{with_python3} %py3_build %endif make -C doc html rm -r doc/_build/html/.buildinfo %install export LC_CTYPE=en_US.utf8 %py2_install %if 0%{with_python3} %py3_install %endif %check nosetests-%{python2_version} \ -e test_get_.*uniform_ts \ -e test_attributes \ -I test_util \ -e create_test_data_file \ -v nsdf/test/ %global _docdir_fmt %{name} %files -n python2-nsdf %license LICENSE %doc README.md %{python2_sitelib}/nsdf* %if 0%{with_python3} %files -n python3-nsdf %license LICENSE %doc README.md %{python3_sitelib}/nsdf* %endif %files doc %license LICENSE %doc README.md %doc doc/_build/html %changelog * Fri Jan 8 2016 Zbigniew Jędrzejewski-Szmek - 0.0-2.git9621ced - Update to latest git snapshot - Add LICENSE to %%files * Wed Dec 16 2015 Zbigniew Jędrzejewski-Szmek - 0.0-1.git2153112 - Initial packaging