%global pypi_name lfpy %global pypi_source 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.7 Release: 1%{?dist} Summary: module for extracellular potentials of multicompartment neuron models on NEURON License: GPLv3 URL: http://LFPy.readthedocs.io Source0: https://files.pythonhosted.org/packages/source/L/%{pypi_source}/%{pypi_source}-%{version}.tar.gz %?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}%{pypi_name} Summary: %{summary} %{?python_provide:%python_provide %{py_version}%{pypi_name}} 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}%{pypi_name} %{desc} %prep %autosetup -n %{pypi_source}-%{version} # Remove bundled egg-info rm -rf %{pypi_source}.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 %build %py3_build %install %py3_install # https://github.com/LFPy/LFPy/issues/139 # %check # %{__python3} setup.py test %files -n %{py_version}%{pypi_name} %license LICENSE %doc README.md %{python3_sitearch}/%{pypi_source} %{python3_sitearch}/%{pypi_source}-%{version}-py?.?.egg-info %changelog * Thu Jun 6 2019 victortyau 2.0.7-1 - Initial package for fedora