62de544
%global _description %{expand:
62de544
This package provides Python libNeuroML, for working with neuronal models
62de544
specified in NeuroML 2 (http://neuroml.org/neuromlv2).  NeuroML provides an
62de544
object model for describing neuronal morphologies, ion channels, synapses and
62de544
3D network structure.  Documentation is available at
62de544
http://readthedocs.org/docs/libneuroml/en/latest/ 
62de544
}
62de544
62de544
62de544
Name:           python-libNeuroML
2fae44e
Version:        0.4.1
62de544
Release:        %autorelease
3235f92
Summary:        Python libNeuroML for working with neuronal models specified in NeuroML
3235f92
3235f92
License:        BSD
c61e01a
URL:            http://neuroml.org/
62de544
Source0:        https://github.com/NeuralEnsemble/libNeuroML/archive/v%{version}/libNeuroML-%{version}.tar.gz
3235f92
3235f92
BuildArch:      noarch
3235f92
62de544
%description %_description
3235f92
62de544
%package -n python3-libNeuroML
3235f92
Summary:        %{summary}
3235f92
BuildRequires:  python3-devel
62de544
62de544
%description -n python3-libNeuroML %_description
3235f92
3235f92
%package doc
62de544
Summary:    Documentation for libNeuroML
3235f92
62de544
%description doc %_description
3235f92
3235f92
%prep
62de544
%autosetup -n libNeuroML-%{version}
3235f92
3235f92
# remove shebang
3235f92
sed -i '1d' neuroml/nml/nml.py
3235f92
c61e01a
# correct end of line encoding
c61e01a
sed -i 's/\r$//' neuroml/examples/test_files/tmp2.swc
c61e01a
62de544
# Do not try to use pytables snapshots from GitHub (Fedora already carries upstream patches for pytables)
62de544
sed -i -e '/^git/ d' -e 's/^tables.*/tables >= 3.3.0/' requirements.txt
62de544
# Do not try to install generateds: it is used by upstream to regenerate nml.py from schema but we don't do this in our build
62de544
sed -i '/generateds/ d' requirements-dev.txt
62de544
62de544
%generate_buildrequires
62de544
%pyproject_buildrequires -r requirements.txt requirements-dev.txt
62de544
3235f92
%build
62de544
%pyproject_wheel
3235f92
62de544
# Do not include sphinx docs since it bundles fonts and js
3235f92
3235f92
%install
62de544
%pyproject_install
62de544
%pyproject_save_files neuroml
3235f92
3235f92
%check
62de544
%{pytest} -k "not mongodb"
3235f92
62de544
%files -n python3-libNeuroML -f %{pyproject_files}
3235f92
%license LICENSE
3235f92
%doc README.md AUTHORS
3235f92
3235f92
%files doc
3235f92
%license LICENSE
3235f92
%doc README.md AUTHORS
62de544
%doc neuroml/examples
3235f92
3235f92
%changelog
62de544
%autochangelog