49c78bc
# Require network, so run locally on mock with --enable-network
49c78bc
%bcond_with tests
1ce0b26
1ce0b26
%global _description \
1ce0b26
A LEMS (http://lems.github.io/LEMS) simulator written in Python which can be \
1ce0b26
used to run NeuroML2 (http://neuroml.org/neuroml2.php) models.
1ce0b26
1ce0b26
89f9229
Name:           python-PyLEMS
74b1508
Version:        0.5.9
89f9229
Release:        %autorelease
1ce0b26
Summary:        LEMS interpreter implemented in Python
1ce0b26
1ce0b26
License:        LGPLv3
1ce0b26
1ce0b26
# Use github source. Pypi source does not include license and examples.
89f9229
URL:            https://github.com/LEMS/pylems/
89f9229
Source0:        %{url}/archive/v%{version}/pylems-%{version}.tar.gz
89f9229
# Generate man page for pylems
74b1508
# help2man -n "LEMS interpreter implemented in Python" --version-string="0.5.9" -N pylems -S "https://lems.github.io" -o pylems.1
89f9229
# Sent upstream: https://github.com/LEMS/pylems/pull/64
1ce0b26
1ce0b26
BuildArch:      noarch
1ce0b26
1ce0b26
%description
1ce0b26
%{_description}
1ce0b26
89f9229
%package -n python3-PyLEMS
1ce0b26
Summary:        %{summary}
1ce0b26
BuildRequires:  python3-devel
49c78bc
%if %{with tests}
89f9229
BuildRequires:  %{py3_dist pytest}
1ce0b26
%endif
1ce0b26
89f9229
%description -n python3-PyLEMS
1ce0b26
%{_description}
1ce0b26
1ce0b26
%package doc
1ce0b26
Summary: %{summary}
1ce0b26
1ce0b26
%description doc
1ce0b26
%{_description}
1ce0b26
1ce0b26
1ce0b26
%prep
89f9229
%autosetup -n pylems-%{version}
1ce0b26
b73811f
# correct man-page path
b73811f
sed -i 's|\[("man/man1"|\[("share/man/man1"|' setup.py
b73811f
1ce0b26
# remove shebang
1ce0b26
sed -i '1d' lems/dlems/exportdlems.py
1ce0b26
89f9229
%generate_buildrequires
89f9229
%pyproject_buildrequires %{?with_tests: -r}
89f9229
1ce0b26
%build
89f9229
%pyproject_wheel
1ce0b26
1ce0b26
%install
89f9229
%pyproject_install
89f9229
%pyproject_save_files lems
89f9229
1ce0b26
1ce0b26
%check
49c78bc
%if %{with tests}
49c78bc
# A lot of the tests use files from other software repositories, so we can't use them.
89f9229
%{pytest}
1ce0b26
PYTHONPATH=%{buildroot}%{python3_sitelib} %{__python3} examples/apitest.py
1ce0b26
PYTHONPATH=%{buildroot}%{python3_sitelib} %{__python3} examples/apitest2.py
1ce0b26
PYTHONPATH=%{buildroot}%{python3_sitelib} %{__python3} examples/loadtest.py
1ce0b26
%endif
1ce0b26
89f9229
%files -n python3-PyLEMS -f %{pyproject_files}
89f9229
%{_bindir}/pylems
74b1508
%{_mandir}/man1/pylems.1*
1ce0b26
1ce0b26
%files doc
1ce0b26
%license LICENSE.lesser
1ce0b26
%doc README.md examples
1ce0b26
1ce0b26
%changelog
89f9229
%autochangelog
89f9229
68b0e32
* Sat Aug 07 2021 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 0.5.4-1
68b0e32
- Update to latest release
68b0e32
f4e62d8
* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.5.2-3
f4e62d8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
f4e62d8
e43f918
* Fri Jun 04 2021 Python Maint <python-maint@redhat.com> - 0.5.2-2
e43f918
- Rebuilt for Python 3.10
e43f918
49c78bc
* Thu Feb 18 2021 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 0.5.2-1
49c78bc
- Update to latest release
49c78bc
5efbb59
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.5.1-2
5efbb59
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
5efbb59
60400c4
* Fri Sep 04 2020 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 0.5.1-1
60400c4
- Update to 0.5.1
60400c4
536ac5e
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.5.0-4
536ac5e
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
536ac5e
2e193f2
* Thu Jun 25 2020 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 0.5.0-3
2e193f2
- Explicitly BR setuptools
2e193f2
58e57b8
* Tue May 26 2020 Miro Hrončok <mhroncok@redhat.com> - 0.5.0-2
58e57b8
- Rebuilt for Python 3.9
58e57b8
9c4e184
* Wed Apr 22 2020 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 0.5.0-1
9c4e184
- Update to new release
9c4e184
- remove py2 bits
9c4e184
96d2cee
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.4.9.1-6
96d2cee
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
96d2cee
ae63950
* Thu Oct 03 2019 Miro Hrončok <mhroncok@redhat.com> - 0.4.9.1-5
ae63950
- Rebuilt for Python 3.8.0rc1 (#1748018)
ae63950
21200c8
* Mon Aug 19 2019 Miro Hrončok <mhroncok@redhat.com> - 0.4.9.1-4
21200c8
- Rebuilt for Python 3.8
21200c8
349a05f
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.4.9.1-3
349a05f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
349a05f
ff812ae
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.4.9.1-2
ff812ae
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
ff812ae
1ce0b26
* Sat Oct 27 2018 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 0.4.9.1-1
1ce0b26
- Initial build