## START: Set by rpmautospec
## (rpmautospec version 0.6.0)
## RPMAUTOSPEC: autorelease, autochangelog
%define autorelease(e:s:pb:n) %{?-p:0.}%{lua:
    release_number = 1;
    base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}"));
    print(release_number + base_release_number - 1);
}%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}}
## END: Set by rpmautospec

%global _description %{expand:
This package provides Python libNeuroML, for working with neuronal models
specified in NeuroML 2 (http://neuroml.org/neuromlv2).  NeuroML provides an
object model for describing neuronal morphologies, ion channels, synapses and
3D network structure.  Documentation is available at
http://readthedocs.org/docs/libneuroml/en/latest/ 
}

%global forgeurl  https://github.com/NeuralEnsemble/libNeuroML

Name:           python-libNeuroML
Version:        0.6.5
Release:        %autorelease
Summary:        Python libNeuroML for working with neuronal models specified in NeuroML

%forgemeta

# Automatically converted from old format: BSD - review is highly recommended.
License:        LicenseRef-Callaway-BSD
URL:            http://neuroml.org/
Source0:        %forgesource

BuildArch:      noarch

%description %_description

%package -n python3-libNeuroML
Summary:        %{summary}
BuildRequires:  python3-devel

%description -n python3-libNeuroML %_description

%package doc
Summary:    Documentation for libNeuroML

%description doc %_description

%prep
%forgeautosetup

# remove shebangs
for f in "neuroml/nml/nml.py" "neuroml/test/test_nml.py" "neuroml/test/test_utils.py"
do
    sed -i '1d'  "${f}"
done

# correct end of line encoding
sed -i 's/\r$//' neuroml/examples/test_files/tmp2.swc

# remove unneeded dev reqs
sed -i -e '/generateds/ d' -e '/flake8$/ d'  -e '/black$/ d' setup.cfg

%generate_buildrequires
%pyproject_buildrequires -x dev

%build
%pyproject_wheel

# Do not include sphinx docs since it bundles fonts and js

%install
%pyproject_install
%pyproject_save_files neuroml

%check
%{pytest} -k "not mongodb"

# remove temporary files generated by tests, we don't want to package these
rm -rf neuroml/examples/tmp/*


%files -n python3-libNeuroML -f %{pyproject_files}
%license LICENSE
%doc README.md AUTHORS

%files doc
%license LICENSE
%doc README.md AUTHORS
%doc neuroml/examples

%changelog
## START: Generated by rpmautospec
* Fri Sep 13 2024 Packit <hello@packit.dev> - 0.6.5-1
- Update to 0.6.5 upstream release
- Resolves: rhbz#2307559

* Wed Sep 04 2024 Miroslav Suchý <msuchy@redhat.com> - 0.6.3-2
- convert license to SPDX

* Tue Aug 20 2024 Packit <hello@packit.dev> - 0.6.3-1
- Update to 0.6.3 upstream release
- Resolves: rhbz#2306049

* Fri Aug 16 2024 Ankur Sinha (Ankur Sinha Gmail) <sanjay.ankur@gmail.com> - 0.6.2-2
- fix: update spec
- Resolves: rhbz#2304307

* Tue Aug 13 2024 Packit <hello@packit.dev> - 0.6.2-1
- Update to 0.6.2 upstream release
- Resolves: rhbz#2304307

* Fri Jul 19 2024 Fedora Release Engineering <releng@fedoraproject.org> - 0.6.1-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild

* Mon Jun 17 2024 Ankur Sinha (Ankur Sinha Gmail) <sanjay.ankur@gmail.com> - 0.6.1-3
- chore: remove dup files (fixes rh#2291350)

* Mon Jun 17 2024 Ankur Sinha (Ankur Sinha Gmail) <sanjay.ankur@gmail.com> - 0.6.1-2
- fix: py3.13 (fixes rh#2291350)

* Tue Jun 11 2024 Packit <hello@packit.dev> - 0.6.1-1
- Update to 0.6.1 upstream release
- Resolves: rhbz#2291350

* Mon Jun 10 2024 Python Maint <python-maint@redhat.com> - 0.5.8-2
- Rebuilt for Python 3.13

* Tue Mar 05 2024 Packit <hello@packit.dev> - 0.5.8-1
- [packit] 0.5.8 upstream release
- Resolves rhbz#2267926

* Fri Jan 26 2024 Fedora Release Engineering <releng@fedoraproject.org> - 0.5.7-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild

* Mon Jan 22 2024 Fedora Release Engineering <releng@fedoraproject.org> - 0.5.7-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild

* Tue Dec 05 2023 Packit <hello@packit.dev> - 0.5.7-1
- [packit] 0.5.7 upstream release
- Resolves rhbz#2252949

* Sun Nov 05 2023 Ankur Sinha (Ankur Sinha Gmail) <sanjay.ankur@gmail.com> - 0.5.5-1
- feat: update to 0.5.5, (fix rh#2239652)

* Sun Nov 05 2023 Ankur Sinha (Ankur Sinha Gmail) <sanjay.ankur@gmail.com> - 0.5.3-4
- chore: add packit

* Tue Aug 08 2023 Ankur Sinha (Ankur Sinha Gmail) <sanjay.ankur@gmail.com> - 0.5.3-3
- chore(packit): remove issue repo URL

* Sat Jul 22 2023 Ankur Sinha (Ankur Sinha Gmail) <sanjay.ankur@gmail.com> - 0.5.3-2
- feat(packit): add initial config

* Sat Jul 22 2023 Ankur Sinha (Ankur Sinha Gmail) <sanjay.ankur@gmail.com> - 0.5.3-1
- feat: update to 0.5.3 (fixes rhbz#2208478)

* Fri Jul 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 0.5.1-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild

* Tue Jul 18 2023 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 0.5.1-2
- Rebuild for python3-tables-0:3.7.0-9.fc39 (rhbz#2220307)

* Fri May 12 2023 Ankur Sinha (Ankur Sinha Gmail) <sanjay.ankur@gmail.com> - 0.5.1-1
- feat: update to 0.5.1 (fixes rhbz#2196814)

* Fri Jan 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 0.4.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild

* Tue Nov 22 2022 Ankur Sinha (Ankur Sinha Gmail) <sanjay.ankur@gmail.com> - 0.4.1-1
- feat: update to 0.4.1

* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.2.55-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild

* Fri Jun 04 2021 Python Maint <python-maint@redhat.com> - 0.2.55-2
- Rebuilt for Python 3.10

* Mon Mar 22 2021 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 0.2.55-1
- Update to new release
- Use pytest, remove patch

* Thu Feb 18 2021 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 0.2.54-1
- Update to latest release

* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.2.52-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild

* Fri Sep 04 2020 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 0.2.52-1
- Update to new upstream release

* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.2.50-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild

* Thu Jun 25 2020 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 0.2.50-2
- Explicitly BR setuptools

* Sun Jun 07 2020 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 0.2.50-1
- Update to 0.2.50

* Tue May 26 2020 Miro Hrončok <mhroncok@redhat.com> - 0.2.47-6
- Rebuilt for Python 3.9

* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.2.47-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild

* Thu Oct 03 2019 Miro Hrončok <mhroncok@redhat.com> - 0.2.47-4
- Rebuilt for Python 3.8.0rc1 (#1748018)

* Mon Aug 19 2019 Miro Hrončok <mhroncok@redhat.com> - 0.2.47-3
- Rebuilt for Python 3.8

* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.2.47-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild

* Thu Apr 11 2019 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 0.2.47-1
- Update to 0.2.47
- use github tar since pypi tar does not contain all required files

* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.2.45-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild

* Sat Oct 27 2018 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 0.2.45-5
- Update to use conditional for spec uniformity

* Fri Oct 26 2018 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 0.2.45-4
- Correct license
- Remove bcond
- Remove hidden buildinfo file
- Correct end of line encoding
- Remove unneeded shebang (https://github.com/NeuralEnsemble/libNeuroML/issues/77)
- Add missing requires

* Thu Oct 25 2018 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 0.2.45-3
- Correct doc build
- Temporarily use bcond

* Thu Oct 25 2018 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 0.2.45-2
- Correct doc sub package name

* Thu Oct 25 2018 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 0.2.45-1
- Initial build


## END: Generated by rpmautospec