Blob Blame History Raw
%global pypi_name LFPy

%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...}

%global py_version python3-
%global py_dist python3dist

Name:		python-lfpy
Version:	2.0.3
Release:	6%{?dist}
Summary:	module for extra cellular potentials of multicompartment neuron models on NEURON

License:	GPLv3
URL:		http://LFPy.readthedocs.io
Source0:	%{pypi_source}

%?python_enable_dependency_generator

BuildRequires:	gcc
BuildRequires:	%{py_version}devel
BuildRequires:	%{py_dist}(cython)
BuildRequires:	%{py_dist}(h5py)
BuildRequires:	%{py_version}mpi4py-mpich
BuildRequires:	%{py_dist}(nose)
BuildRequires:	%{py_dist}(numpy)
BuildRequires:	%{py_dist}(scipy)
BuildRequires:	%{py_dist}(setuptools)
BuildRequires:	%{py_version}mpi4py-openmpi
BuildRequires:	mpi4py-common


%description
%{desc}

%package -n	%{py_version}lfpy
Summary:	%{summary}
%{?python_provide:%python_provide %{py_version}lfpy}
 
Requires:	%{py_dist}(h5py)
Requires:	%{py_version}mpi4py-mpich
Requires:	%{py_version}mpi4py-openmpi
Requires:	%{py_dist}(nose)
Requires:	%{py_dist}(numpy)
Requires:	%{py_dist}(scipy)

%description -n	%{py_version}lfpy
%{desc}

%prep
%autosetup -n %{pypi_name}-%{version}
# Remove bundled egg-info
rm -rf %{pypi_name}.egg-info

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

chmod 0644 %{pypi_name}/alias_method.pyx
chmod 0644 %{pypi_name}/run_simulation.pyx

%build
%py3_build

%install
%py3_install

# %check
# %{__python3} setup.py test

%files -n %{py_version}lfpy
%license LICENSE
%doc README.md
%{python3_sitearch}/%{pypi_name}
%{python3_sitearch}/%{pypi_name}-%{version}-py?.?.egg-info

%changelog
* Sat Aug 31 2019 Luis Bazan <lbazan@fedoraproject.org> - 2.0.3-6
- fix typos in spec

* Mon Aug 26 2019 Luis Bazan <lbazan@fedoraproject.org> - 2.0.3-5
- fix comment #14 BZ #1727491

* Mon Aug 26 2019 Luis Bazan <lbazan@fedoraproject.org> - 2.0.3-4
- fix mixed space and tabs
- non-executable script

* Mon Aug 26 2019 Luis Bazan <lbazan@fedoraproject.org> - 2.0.3-3
- fix some typos and import source

* Thu Aug 22 2019 Miro HronĨok <mhroncok@redhat.com> - 2.0.3-2
- Rebuilt for Python 3.8

* Thu Jun  6 2019 victortyau <victortyau@gmail.com> 2.0.3-1
- Initial package for fedora