## START: Set by rpmautospec ## (rpmautospec version 0.2.5) %define autorelease(e:s:pb:) %{?-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*}}%{?dist} ## END: Set by rpmautospec %global desc %{expand: \ LFPy is a Python-module for calculation of extracellular potentials from multi-compartment neuron models. It relies on the NEURON simulator ( and uses the Python interface ( it provides.LFPy provides a set of easy-to-use Python classes for setting up your model, running your simulations and calculating the extracellular potentials arising from activity in your model neuron. If you have a model...} Name: python-lfpy Version: 2.2.4 Release: %autorelease Summary: Model extracellular potentials of multicompartment neuron models built on NEURON License: GPLv3 URL: http://LFPy.readthedocs.io Source0: %{pypi_source LFPy} # Requires NEURON, so limited to arches that NEURON and Random123 support ExcludeArch: mips64r2 mips32r2 s390 # Upstream does not support powerpc or 32bit arches # https://github.com/LFPy/LFPy/issues/173 # Bug: ppc: https://bugzilla.redhat.com/show_bug.cgi?id=1838565 # Bug: armv7hl: https://bugzilla.redhat.com/show_bug.cgi?id=1838564 ExcludeArch: %{power64} %{ix86} armv7hl BuildRequires: python3-devel BuildRequires: python3-wheel BuildRequires: python3-pip # Automatic dep generator doesn't like the mod files mentioned in the setup.py file, and tries to parse them as deps: # error: Dependency tokens must begin with alpha-numeric, '_' or '/': "./expsyni.mod" "./sinsyn.mod" # Should maybe reported as a pyproject rpm macro bug? # So we install these manually BuildRequires: python3-Cython BuildRequires: python3-numpy BuildRequires: python3-scipy BuildRequires: python3-lfpykit >= 0.4 BuildRequires: python3-h5py BuildRequires: python3-neuron BuildRequires: neuron-devel BuildRequires: python3-pytest # not included in setup.py BuildRequires: python3-mpi4py-openmpi BuildRequires: python3-neuron-openmpi BuildRequires: python3-mpi4py-mpich BuildRequires: python3-neuron-mpich BuildRequires: mpich-devel BuildRequires: openmpi-devel BuildRequires: rpm-mpi-hooks %description %{desc} %package -n python3-lfpy Summary: %{summary} Requires: python3-mpi4py-openmpi Requires: python3-mpi4py-mpich Requires: neuron-devel %description -n python3-lfpy %{desc} %prep %autosetup -n LFPy-%{version} # Remove mpi4py from requirements sed -i '/mpi4py/ d' setup.py for lib in $(find . -type f -name "*.py"); do sed '1{\@^#!/usr/bin/env python@d}' $lib > $lib.new && touch -r $lib $lib.new && mv $lib.new $lib done %build %pyproject_wheel %install %pyproject_install # Remove unneeded test files: they include objects and libraries generated from neuron. #rm -rf %{buildroot}/%{python3_sitearch}/LFPy/test/ # Remove associated debuginfo files #rm -rf %{buildroot}/usr/lib/debug/%{python3_sitearch}/LFPy/test/ %pyproject_save_files LFPy %check # https://github.com/LFPy/LFPy/blob/master/continuous_integration/test_script.sh#L16 %{_mpich_load} %{pytest} LFPy/test/ %{_mpich_unload} %{_openmpi_load} %{pytest} LFPy/test/ %{_openmpi_unload} %files -n python3-lfpy -f %{pyproject_files} %doc README.md # temporary files generated for test %exclude %{python3_sitearch}/LFPy/test/x86_64 %exclude %{python3_sitearch}/LFPy/test/ %changelog * Wed Feb 23 2022 Ankur Sinha (Ankur Sinha Gmail) 2.2.4-1 - chore: update version * Wed Feb 23 2022 Ankur Sinha (Ankur Sinha Gmail) 2.2.2-5 - feat: update to 2.2.4 (fixes rhbz#2026956) * Wed Feb 23 2022 Ankur Sinha (Ankur Sinha Gmail) 2.2.2-4 - chore: clean up spec * Fri Jan 21 2022 Fedora Release Engineering - 2.2.2-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild * Mon Oct 18 2021 Luis Bazan - 2.2.2-1 - New upstream version * Fri Jul 23 2021 Fedora Release Engineering - 2.2.1-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild * Sun Jun 27 2021 Ankur Sinha - 2.2.1-3 - Enable tests * Fri Jun 04 2021 Python Maint - 2.2.1-2 - Rebuilt for Python 3.10 * Wed Apr 07 2021 Luis Bazan - 2.2.1-1 - New upstream version * Wed Jan 27 2021 Fedora Release Engineering - 2.1.2-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild * Thu Nov 26 2020 Ankur Sinha - 2.1.2-1 - Update to latest release * Sat Aug 01 2020 Fedora Release Engineering - 2.0.7-8 - Second attempt - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild * Wed Jul 29 2020 Fedora Release Engineering - 2.0.7-7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild * Tue May 26 2020 Miro Hrončok - 2.0.7-6 - Rebuilt for Python 3.9 * Thu May 21 2020 Ankur Sinha - 2.0.7-5 - Re-enable tests - Add arches that we cannot build on - List bugs for for ExcludeArch * Thu May 21 2020 Ankur Sinha - 2.0.7-4 - Update supported architectures * Wed May 13 2020 Ankur Sinha - 2.0.7-3 - Cosmetic changes to spec - Add missing Requires/BR on neuron - Enable test - List supported arches - Remove unneeded test files * Wed May 13 2020 Ankur Sinha - 2.0.7-2 - Remove auto-generated mpi4py requires, we use explicitly mention the necessary packages in Requires * Thu Jan 30 2020 Fedora Release Engineering - 2.0.3-8 - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild * Thu Oct 03 2019 Miro Hrončok - 2.0.3-7 - Rebuilt for Python 3.8.0rc1 (#1748018) * Sat Aug 31 2019 Luis Bazan - 2.0.3-6 - fix typos in spec * Mon Aug 26 2019 Luis Bazan - 2.0.3-5 - fix comment #14 BZ #1727491 * Mon Aug 26 2019 Luis Bazan - 2.0.3-4 - fix mixed space and tabs - non-executable script * Mon Aug 26 2019 Luis Bazan - 2.0.3-3 - fix some typos and import source * Thu Aug 22 2019 Miro Hrončok - 2.0.3-2 - Rebuilt for Python 3.8 * Thu Jun 6 2019 victortyau 2.0.3-1 - Initial package for fedora