|
|
eef1ec8 |
%global desc %{expand: \
|
|
|
eef1ec8 |
LFPy is a Python-module for calculation of extracellular potentials from
|
|
|
eef1ec8 |
multi-compartment neuron models. It relies on the NEURON simulator ( and uses
|
|
|
eef1ec8 |
the Python interface ( it provides.LFPy provides a set of easy-to-use Python
|
|
|
eef1ec8 |
classes for setting up your model, running your simulations and calculating the
|
|
|
eef1ec8 |
extracellular potentials arising from activity in your model neuron. If you
|
|
|
eef1ec8 |
have a model...}
|
|
|
eef1ec8 |
|
|
|
c2f4161 |
Name: python-lfpy
|
|
|
495fc68 |
Version: 2.2.4
|
|
|
620260d |
Release: %autorelease
|
|
|
92f01a0 |
Summary: Model extracellular potentials of multicompartment neuron models built on NEURON
|
|
|
c2f4161 |
|
|
|
c2f4161 |
License: GPLv3
|
|
|
c2f4161 |
URL: http://LFPy.readthedocs.io
|
|
|
6cc41cc |
Source0: %{pypi_source LFPy}
|
|
|
c2f4161 |
|
|
|
1c83310 |
# Requires NEURON, so limited to arches that NEURON and Random123 support
|
|
|
1c83310 |
ExcludeArch: mips64r2 mips32r2 s390
|
|
|
8aa4dd9 |
# Upstream does not support powerpc or 32bit arches
|
|
|
8aa4dd9 |
# https://github.com/LFPy/LFPy/issues/173
|
|
|
8aa4dd9 |
# Bug: ppc: https://bugzilla.redhat.com/show_bug.cgi?id=1838565
|
|
|
8aa4dd9 |
# Bug: armv7hl: https://bugzilla.redhat.com/show_bug.cgi?id=1838564
|
|
|
8aa4dd9 |
ExcludeArch: %{power64} %{ix86} armv7hl
|
|
|
1c83310 |
|
|
|
eef1ec8 |
|
|
|
92f01a0 |
BuildRequires: python3-devel
|
|
|
e4aee51 |
BuildRequires: python3-wheel
|
|
|
e4aee51 |
BuildRequires: python3-pip
|
|
|
e4aee51 |
|
|
|
e4aee51 |
# Automatic dep generator doesn't like the mod files mentioned in the setup.py file, and tries to parse them as deps:
|
|
|
e4aee51 |
# error: Dependency tokens must begin with alpha-numeric, '_' or '/': "./expsyni.mod" "./sinsyn.mod"
|
|
|
e4aee51 |
# Should maybe reported as a pyproject rpm macro bug?
|
|
|
e4aee51 |
# So we install these manually
|
|
|
e4aee51 |
|
|
|
e4aee51 |
BuildRequires: python3-Cython
|
|
|
e4aee51 |
BuildRequires: python3-numpy
|
|
|
e4aee51 |
BuildRequires: python3-scipy
|
|
|
e4aee51 |
BuildRequires: python3-lfpykit >= 0.4
|
|
|
e4aee51 |
BuildRequires: python3-h5py
|
|
|
e4aee51 |
BuildRequires: python3-neuron
|
|
|
92f01a0 |
BuildRequires: neuron-devel
|
|
|
e4aee51 |
BuildRequires: python3-pytest
|
|
|
92f01a0 |
|
|
|
e4aee51 |
# not included in setup.py
|
|
|
92f01a0 |
BuildRequires: python3-mpi4py-openmpi
|
|
|
9ea486b |
BuildRequires: python3-neuron-openmpi
|
|
|
92f01a0 |
BuildRequires: python3-mpi4py-mpich
|
|
|
9ea486b |
BuildRequires: python3-neuron-mpich
|
|
|
92f01a0 |
BuildRequires: mpich-devel
|
|
|
92f01a0 |
BuildRequires: openmpi-devel
|
|
|
92f01a0 |
BuildRequires: rpm-mpi-hooks
|
|
|
eef1ec8 |
|
|
|
eef1ec8 |
%description
|
|
|
eef1ec8 |
%{desc}
|
|
|
eef1ec8 |
|
|
|
c2f4161 |
|
|
|
6cc41cc |
%package -n python3-lfpy
|
|
|
c2f4161 |
Summary: %{summary}
|
|
|
c1c0a98 |
|
|
|
92f01a0 |
Requires: python3-mpi4py-openmpi
|
|
|
92f01a0 |
Requires: python3-mpi4py-mpich
|
|
|
e4aee51 |
Requires: neuron-devel
|
|
|
e4aee51 |
|
|
|
e4aee51 |
|
|
|
e4aee51 |
%description -n python3-lfpy
|
|
|
e4aee51 |
%{desc}
|
|
|
c2f4161 |
|
|
|
eef1ec8 |
%prep
|
|
|
6cc41cc |
%autosetup -n LFPy-%{version}
|
|
|
eef1ec8 |
|
|
|
c1c0a98 |
# Remove mpi4py from requirements
|
|
|
c1c0a98 |
sed -i '/mpi4py/ d' setup.py
|
|
|
eef1ec8 |
|
|
|
eef1ec8 |
for lib in $(find . -type f -name "*.py"); do
|
|
|
eef1ec8 |
sed '1{\@^#!/usr/bin/env python@d}' $lib > $lib.new &&
|
|
|
eef1ec8 |
touch -r $lib $lib.new &&
|
|
|
eef1ec8 |
mv $lib.new $lib
|
|
|
eef1ec8 |
done
|
|
|
eef1ec8 |
|
|
|
eef1ec8 |
%build
|
|
|
e4aee51 |
%pyproject_wheel
|
|
|
eef1ec8 |
|
|
|
eef1ec8 |
%install
|
|
|
e4aee51 |
%pyproject_install
|
|
|
e4aee51 |
|
|
|
e4aee51 |
# Remove unneeded test files: they include objects and libraries generated from neuron.
|
|
|
e4aee51 |
#rm -rf %{buildroot}/%{python3_sitearch}/LFPy/test/
|
|
|
e4aee51 |
# Remove associated debuginfo files
|
|
|
e4aee51 |
#rm -rf %{buildroot}/usr/lib/debug/%{python3_sitearch}/LFPy/test/
|
|
|
e4aee51 |
|
|
|
e4aee51 |
%pyproject_save_files LFPy
|
|
|
eef1ec8 |
|
|
|
c2f4161 |
|
|
|
92f01a0 |
%check
|
|
|
92f01a0 |
# https://github.com/LFPy/LFPy/blob/master/continuous_integration/test_script.sh#L16
|
|
|
3454007 |
%{_mpich_load}
|
|
|
3454007 |
%{pytest} LFPy/test/
|
|
|
3454007 |
%{_mpich_unload}
|
|
|
eef1ec8 |
|
|
|
3454007 |
%{_openmpi_load}
|
|
|
3454007 |
%{pytest} LFPy/test/
|
|
|
3454007 |
%{_openmpi_unload}
|
|
|
eef1ec8 |
|
|
|
c2f4161 |
|
|
|
92f01a0 |
|
|
|
e4aee51 |
%files -n python3-lfpy -f %{pyproject_files}
|
|
|
eef1ec8 |
%doc README.md
|
|
|
e4aee51 |
# temporary files generated for test
|
|
|
e4aee51 |
%exclude %{python3_sitearch}/LFPy/test/x86_64
|
|
|
e4aee51 |
%exclude %{python3_sitearch}/LFPy/test/
|
|
|
eef1ec8 |
|
|
|
eef1ec8 |
%changelog
|
|
|
620260d |
%autochangelog
|