Blame python-netpyne.spec

c2cc856
# No tests, they run examples for tests.
c2cc856
# https://github.com/Neurosim-lab/netpyne/blob/development/.travis.yml
c2cc856
# Require optional pyneuroml, which cannot be packaged in Fedora.
c2cc856
# Refer to https://docs.fedoraproject.org/en-US/neurofedora/copr/ for more information.
c2cc856
c2cc856
# So tests are disabled
c2cc856
# We add + enable the NeuroFedora COPR for pyneuroml in mock and run tests
c2cc856
# manually
c2cc856
# mock -r fedora-rawhide-x86_64 rebuild <srpm> --enablerepo=neurofedora-copr --with=tests
c2cc856
c2cc856
%bcond_with tests
c2cc856
c2cc856
# Missing a dep, currently disabled
c2cc856
%bcond_with docs
c2cc856
c2cc856
%global pypi_name netpyne
c2cc856
c2cc856
%global _description %{expand:
c2cc856
NetPyNE is a Python package to facilitate the development, simulation,
c2cc856
parallelization, analysis, and optimization of biological neuronal networks
c2cc856
using the NEURON simulator.
c2cc856
c2cc856
For more details, installation instructions, documentation, tutorials, forums,
c2cc856
videos and more, please visit: www.netpyne.org
c2cc856
c2cc856
This package is developed and maintained by the Neurosim lab
c2cc856
(www.neurosimlab.org) }
c2cc856
c2cc856
Name:           python-%{pypi_name}
c4f4225
Version:        1.0.0.2
c4f4225
Release:        1%{?dist}
c2cc856
Summary:        Develop, simulate and analyse biological neuronal networks in NEURON
c2cc856
c2cc856
# netpyne/support/stackedBarGraph.py is GPLv3+
c2cc856
# everything else is MIT
c2cc856
License:        MIT and GPLv3+
c2cc856
URL:            https://github.com/Neurosim-lab/%{pypi_name}/
807471a
Source0:        %{url}/archive/v%{version}/%{name}-%{version}.tar.gz
c2cc856
c2cc856
BuildArch:      noarch
c2cc856
c2cc856
%description %_description
c2cc856
c2cc856
%package -n python3-%{pypi_name}
c2cc856
Summary:        %{summary}
c2cc856
BuildRequires:  python3-devel
c2cc856
BuildRequires:  python3-setuptools
c2cc856
c2cc856
# Docs
c2cc856
%if %{with docs}
c2cc856
BuildRequires:  %{py3_dist sphinx}
c2cc856
# Not yet packaged
c2cc856
# BuildRequires:  %%{py3_dist autodocsum}
c2cc856
%endif
c2cc856
c2cc856
%if %{with tests}
c2cc856
BuildRequires:  gcc-g++
c2cc856
BuildRequires:  %{py3_dist bokeh}
c2cc856
BuildRequires:  %{py3_dist scipy}
c2cc856
BuildRequires:  %{py3_dist future}
c2cc856
BuildRequires:  %{py3_dist matplotlib}
c2cc856
BuildRequires:  %{py3_dist matplotlib-scalebar}
c2cc856
BuildRequires:  neuron-devel
c2cc856
BuildRequires:  %{py3_dist numpy}
c2cc856
BuildRequires:  %{py3_dist pandas}
c2cc856
BuildRequires:  %{py3_dist pyneuroml}
c2cc856
%endif
c2cc856
c2cc856
Requires:  %{py3_dist neuron}
c2cc856
# Optional dep in COPR, users will have to install it manually if they want to use its features
c2cc856
# Requires:  %%{py3_dist pyneuroml}
c2cc856
c2cc856
%description -n python3-%{pypi_name} %_description
c2cc856
c2cc856
%package doc
c2cc856
Summary:        %{summary}
c2cc856
c2cc856
%description doc
c2cc856
Documentation for %{name}.
c2cc856
c2cc856
%prep
807471a
%autosetup -n %{pypi_name}-%{version}
c2cc856
rm -rf %{pypi_name}.egg-info
c2cc856
c2cc856
# None executable script
c2cc856
find . -type f -name "*.py" -exec sed -i '/^#![  ]*\/usr\/bin\/env.*$/ d' {} 2>/dev/null ';'
c2cc856
c2cc856
%build
c2cc856
%py3_build
c2cc856
c2cc856
%if %{with docs}
c2cc856
pushd doc/
c2cc856
    %{python3} build.py
c2cc856
popd
c2cc856
%endif
c2cc856
c2cc856
%install
c2cc856
%py3_install
c2cc856
c2cc856
%check
c2cc856
%if %{with tests}
c2cc856
export PYTHONPATH=$RPM_BUILD_ROOT/%{python3_sitelib}
807471a
pushd doc/source/code
807471a
nrnivmodl mod
807471a
%{python3} tut2.py --nogui
807471a
%{python3} tut3.py --nogui
807471a
%{python3} tut4.py --nogui
807471a
%{python3} tut5.py --nogui
807471a
%{python3} tut6.py --nogui
807471a
%{python3} tut7.py --nogui
807471a
popd
c2cc856
c2cc856
pushd examples/HHTut
c2cc856
%{python3} HHTut_run.py -nogui
c2cc856
%{python3} HHTut_export.py -nogui
c2cc856
popd
c2cc856
c2cc856
pushd examples/HybridTut
c2cc856
nrnivmodl .
c2cc856
%{python3} HybridTut_run.py -nogui
c2cc856
%{python3} HybridTut_export.py -nogui
c2cc856
popd
c2cc856
c2cc856
pushd examples/M1
c2cc856
nrnivmodl .
c2cc856
%{python3} M1_run.py -nogui
c2cc856
%{python3} M1_export.py -nogui
c2cc856
popd
c2cc856
c2cc856
pushd examples/PTcell
c2cc856
nrnivmodl mod
c2cc856
%{python3} init.py -nogui
c2cc856
popd
c2cc856
c2cc856
pushd examples/LFPrecording
c2cc856
nrnivmodl mod
c2cc856
%{python3} cell_lfp.py -nogui
c2cc856
popd
c2cc856
c2cc856
pushd examples/saving
c2cc856
%{python3} init.py -nogui
c2cc856
popd
c2cc856
c2cc856
pushd examples/rxd_buffering
c2cc856
%{python3} buffering.py -nogui
c2cc856
popd
c2cc856
c2cc856
pushd examples/rxd_net
c2cc856
nrnivmodl mod
c2cc856
%{python3} init.py -nogui
c2cc856
popd
c2cc856
c2cc856
pushd examples/NeuroMLImport/
c2cc856
nrnivmodl .
c2cc856
%{python3} SimpleNet_import.py -nogui
c2cc856
popd
c2cc856
%endif
c2cc856
c2cc856
%files -n python3-%{pypi_name}
c2cc856
%license LICENSE
c2cc856
%doc README.md CHANGES.md
c2cc856
%{python3_sitelib}/%{pypi_name}-%{version}-py%{python3_version}.egg-info
c2cc856
%{python3_sitelib}/%{pypi_name}
c2cc856
c2cc856
%if %{with docs}
c2cc856
%files doc
c2cc856
%license LICENSE
c2cc856
%doc doc/build/html
c2cc856
%endif
c2cc856
c2cc856
%changelog
c4f4225
* Mon Aug 16 2021 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 1.0.0.2-1
c4f4225
- Update to latest release
c4f4225
e595add
* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.9.1-3
e595add
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
e595add
f6eb9a6
* Fri Jun 04 2021 Python Maint <python-maint@redhat.com> - 0.9.9.1-2
f6eb9a6
- Rebuilt for Python 3.10
f6eb9a6
4e0f76b
* Thu Mar 04 2021 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 0.9.9.1-1
4e0f76b
- Update to latest upstream release
4e0f76b
3dc80b2
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.8-2
3dc80b2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
3dc80b2
807471a
* Mon Nov 23 2020 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 0.9.8-1
807471a
- Update to latest release
807471a
c2cc856
* Tue Oct 13 2020 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 0.9.7-2.20201009git548ffc6
c2cc856
- Update license to include GPLv3+
c2cc856
- Add comment to explain why pyneuroml cannot be included in Fedora
c2cc856
- use python3 instead of __python3
c2cc856
c2cc856
* Fri Oct 09 2020 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 0.9.7-2.20201009git548ffc6
c2cc856
- Update to latest snapshot
c2cc856
- Remove unneeded BRs
c2cc856
- Document how to run with tests enabled in mock
c2cc856
c2cc856
* Thu Oct 08 2020 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 0.9.7-1
c2cc856
- Initial build