## START: Set by rpmautospec ## (rpmautospec version 0.6.0) ## RPMAUTOSPEC: autorelease, autochangelog %define autorelease(e:s:pb:n) %{?-p:0.}%{lua: release_number = 3; 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 # No tests, they run examples for tests. # https://github.com/Neurosim-lab/netpyne/blob/development/.travis.yml # Some tests require optional pyneuroml, which cannot be packaged in Fedora. # Refer to https://docs.fedoraproject.org/en-US/neurofedora/copr/ for more information. # So these tests are disabled # We add + enable the NeuroFedora COPR for pyneuroml in mock and run tests # manually # mock -r fedora-rawhide-x86_64 rebuild --enablerepo=neurofedora-copr --with=pyneuroml %bcond pyneuroml 0 # disable debuginfo # sub package is noarch, but keep the main package archful to run tests on all arches. %global debug_package %{nil} %global _description %{expand: NetPyNE is a Python package to facilitate the development, simulation, parallelization, analysis, and optimization of biological neuronal networks using the NEURON simulator. For more details, installation instructions, documentation, tutorials, forums, videos and more, please visit: www.netpyne.org This package is developed and maintained by the Neurosim lab (www.neurosimlab.org) } %global forgeurl https://github.com/Neurosim-lab/netpyne/ Name: python-netpyne Version: 1.0.6 Release: %autorelease Summary: Develop, simulate and analyse biological neuronal networks in NEURON %forgemeta # netpyne/support/stackedBarGraph.py is GPLv3+ # netpyne/support/filter.py is GPLv3 # netpyne/analysis/filter.py is GPLv3 # everything else is MIT # spdx License: MIT AND GPL-3.0-only AND GPL-3.0-or-later URL: %forgeurl Source0: %forgesource # Exclude tests/ from being installed as a top level module # https://github.com/suny-downstate-medical-center/netpyne/pull/767 Patch: https://github.com/suny-downstate-medical-center/netpyne/pull/767.patch # remove `imp` in py3.12 # sent upstream: https://github.com/suny-downstate-medical-center/netpyne/pull/812 Patch: 0001-fix-py312-remove-imp.patch # https://fedoraproject.org/wiki/Changes/EncourageI686LeafRemoval ExcludeArch: %{ix86} %description %_description %package -n python3-netpyne Summary: %{summary} # Main package is not noarch so that tests can be run on all platforms # but the sub-package can be noarch BuildArch: noarch BuildRequires: gcc-g++ BuildRequires: git-core BuildRequires: neuron-devel BuildRequires: python3-devel BuildRequires: python3-setuptools BuildRequires: python3-neuron # skipped in setup.py BuildRequires: python3-dill %if %{with pyneuroml} BuildRequires: %{py3_dist pyneuroml} %endif # Not mentioned in setup.py etc. Requires: %{py3_dist neuron} # Optional dep in COPR, users will have to install it manually if they want to use its features # Requires: %%{py3_dist pyneuroml} %description -n python3-netpyne %_description %prep %forgeautosetup -S git sed -i 's/matplotlib<=3.5.1/matplotlib/' setup.py # None executable script find . -type f -name "*.py" -exec sed -i '/^#![ ]*\/usr\/bin\/env.*$/ d' {} 2>/dev/null ';' %generate_buildrequires %pyproject_buildrequires %build %pyproject_wheel %install %pyproject_install %pyproject_save_files -l netpyne %check # Do not test optional modules that have requirements not yet packaged in Fedora # sbi: requires pytorch %pyproject_check_import -e *optuna* -e *sbi* export %{py3_test_envvars} pushd doc/source/code nrnivmodl mod %{python3} tut2.py --nogui || true %{python3} tut3.py --nogui || true %{python3} tut4.py --nogui || true %{python3} tut5.py --nogui || true %{python3} tut6.py --nogui || true %{python3} tut7.py --nogui || true popd # some of these are currently broken upstream pushd examples/HHTut/src %{python3} init.py -nogui || true popd pushd examples/HybridTut/src/ nrnivmodl ../mod/ %{python3} init.py -nogui || true popd pushd examples/M1/src nrnivmodl ../mod %{python3} init.py -nogui || true popd # this one failes, there's no init.py file in the main directory pushd examples/PTcell/src nrnivmodl ../mod/ %{python3} init.py -nogui || true popd pushd examples/LFPrecording nrnivmodl mod %{python3} cell_lfp.py -nogui || true popd pushd examples/saving %{python3} init.py -nogui || true popd pushd examples/rxd_buffering %{python3} buffering.py -nogui || true popd pushd examples/rxd_net/ nrnivmodl mod %{python3} src/init.py -nogui || true popd %if %{with pyneuroml} pushd examples/NeuroMLImport/ nrnivmodl . %{python3} SimpleNet_import.py -nogui || true popd %endif %files -n python3-netpyne -f %{pyproject_files} %doc README.md CHANGES.md %changelog ## START: Generated by rpmautospec * Sun Mar 17 2024 Ankur Sinha (Ankur Sinha Gmail) - 1.0.6-3 - fix: patch out `imp` (fixes rh#2264045) * Sun Feb 25 2024 Ankur Sinha (Ankur Sinha Gmail) - 1.0.6-2 - feat: minor spec fixes (fixes rh#2264045) * Tue Feb 13 2024 Packit - 1.0.6-1 - [packit] 1.0.6 upstream release - Resolves rhbz#2264045 * Fri Jan 26 2024 Fedora Release Engineering - 1.0.5-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild * Mon Jan 22 2024 Fedora Release Engineering - 1.0.5-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild * Thu Jan 04 2024 Benjamin A. Beasley - 1.0.5-4 - Assert that a license file is present in the .dist-info directory * Wed Oct 18 2023 Miroslav Suchý - 1.0.5-3 - Correct SPDX license formula * Tue Oct 17 2023 Benjamin A. Beasley - 1.0.5-2 - F38+: Use %%{py3_test_envvars} to set up environment for tests * Fri Oct 13 2023 Ankur Sinha (Ankur Sinha Gmail) - 1.0.5-1 - feat: update to 1.0.5 (fixes rh#2240142) * Fri Oct 13 2023 Ankur Sinha (Ankur Sinha Gmail) - 1.0.4.2-2 - chore: add packit * Wed Jul 26 2023 Sandro - 1.0.4.2-1 - Update to 1.0.4.2 (RHBZ#2226043) - Apply patch to exclude tests from installation * Tue Jul 25 2023 Python Maint - 1.0.4.1-3 - Rebuilt for Python 3.12 * Fri Jul 21 2023 Fedora Release Engineering - 1.0.4.1-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild * Mon May 01 2023 Ankur Sinha (Ankur Sinha Gmail) - 1.0.4.1-1 - feat: update to 1.0.4.1 (fixes rhbz#2183286) * Fri Feb 03 2023 Benjamin A. Beasley - 1.0.3.1-3 - Leaf package on ix86: drop ix86 support * Fri Jan 20 2023 Fedora Release Engineering - 1.0.3.1-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild * Thu Jan 12 2023 Ankur Sinha (Ankur Sinha Gmail) - 1.0.3.1-1 - feat: update to 1.0.3.1 (fixes rhbz#2142245) * Mon Aug 01 2022 Ankur Sinha (Ankur Sinha Gmail) - 1.0.2.1-1 - feat: update to 1.0.2. (fixes rhbz#2056106) * Fri Jul 22 2022 Fedora Release Engineering - 1.0.1-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild * Thu Jun 23 2022 Python Maint - 1.0.1-2 - Rebuilt for Python 3.11 * Fri Feb 18 2022 Ankur Sinha (Ankur Sinha Gmail) - 1.0.1-1 - feat: update to 1.0.1 * Fri Feb 18 2022 Ankur Sinha (Ankur Sinha Gmail) - 1.0.0.2-6 - feat: run tests on all arches but make them informative only * Fri Feb 18 2022 Ankur Sinha (Ankur Sinha Gmail) - 1.0.0.2-5 - feat: drop doc sub-package * Fri Feb 18 2022 Ankur Sinha (Ankur Sinha Gmail) - 1.0.0.2-4 - feat: use pyproject macros and enable tests * Fri Jan 21 2022 Fedora Release Engineering - 1.0.0.2-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild * Mon Aug 16 2021 Ankur Sinha - 1.0.0.2-1 - Update to latest release * Fri Jul 23 2021 Fedora Release Engineering - 0.9.9.1-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild * Fri Jun 04 2021 Python Maint - 0.9.9.1-2 - Rebuilt for Python 3.10 * Thu Mar 04 2021 Ankur Sinha - 0.9.9.1-1 - Update to latest upstream release * Wed Jan 27 2021 Fedora Release Engineering - 0.9.8-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild * Mon Nov 23 2020 Ankur Sinha - 0.9.8-1 - Update to latest release * Tue Oct 13 2020 Ankur Sinha - 0.9.7-2.20201009git548ffc6 - Update license to include GPLv3+ - Add comment to explain why pyneuroml cannot be included in Fedora - use python3 instead of __python3 * Fri Oct 09 2020 Ankur Sinha - 0.9.7-2.20201009git548ffc6 - Update to latest snapshot - Remove unneeded BRs - Document how to run with tests enabled in mock * Thu Oct 08 2020 Ankur Sinha - 0.9.7-1 - Initial build ## END: Generated by rpmautospec