c046d95
%bcond_without tests
099c1c4
aab7af1
%global forgeurl  https://github.com/BlueBrain/eFEL
099c1c4
# Use github commit tar instead of pypi which does not include tests
e6ea793
%global commit cc9a2b71c14a507fabf509ba73cb053bae14a53c
e1dde03
aee971f
aee971f
%global desc %{expand: \
aee971f
The Electrophys Feature Extraction Library (eFEL) allows neuroscientists to
aee971f
automatically extract features from time series data recorded from neurons
aee971f
(both in vitro and in silico). Examples are the action potential width and
aee971f
amplitude in voltage traces recorded during whole-cell patch clamp experiments.
aee971f
The user of the library provides a set of traces and selects the features to be
aee971f
calculated. The library will then extract the requested features and return the
aee971f
values to the user.
aee971f
aee971f
The core of the library is written in C++, and a Python wrapper is included. At
aee971f
the moment we provide a way to automatically compile and install the library as
aee971f
a Python module.}
aee971f
216e59c
Name:           python-efel
e6ea793
Version:        5.4.0
8bbd767
Release:        %autorelease
aee971f
Summary:        Electrophys Feature Extraction Library
aab7af1
%forgemeta
aee971f
e747e02
# python-pyedflib does not support s390x$
e747e02
# https://src.fedoraproject.org/rpms/python-pyedflib/blob/rawhide/f/python-pyedflib.spec$
e747e02
ExcludeArch:    s390x
e747e02
e6ea793
# spdx
e6ea793
# pyfeatures/* and tests/* are BSD 3-Clause, the rest are LGPLv3
b030655
License:        LGPL-3.0-only AND BSD-3-Clause
aee971f
URL:            http://efel.readthedocs.io/
aab7af1
Source0:        %{forgesource}
882ca84
# Use the _version.py from pypi
882ca84
Source1:        _version.py
aee971f
aee971f
BuildRequires:  gcc-c++
aab7af1
BuildRequires:  python3-devel
aee971f
aee971f
%description
aee971f
%{desc}
aee971f
216e59c
%package -n python3-efel
aee971f
Summary:        %{summary}
4bf2750
BuildRequires:  python3-setuptools
c046d95
BuildRequires:  python3-pytest
c046d95
# from extras, but neo in Fedora doesn't provide extras yet, so we can't use
c046d95
# the -x neo flag in pyproject_buildrequires
c046d95
BuildRequires:  python3-neo
c046d95
BuildRequires:  python3-scipy
099c1c4
216e59c
%description -n python3-efel
aee971f
%{desc}
aee971f
aee971f
%prep
aab7af1
%forgesetup
216e59c
rm -rf efel.egg-info
aee971f
882ca84
# Install the version file
882ca84
cp %{SOURCE1} efel/_version.py -v
099c1c4
aab7af1
%generate_buildrequires
c046d95
%pyproject_buildrequires
aab7af1
aee971f
%build
aab7af1
%pyproject_wheel
aee971f
aee971f
%install
aee971f
# Remove headers. We won't provide them here.
aab7af1
rm -rf %{buildroot}/%{python3_sitearch}/efel/cppcore/
aab7af1
%pyproject_install
e6ea793
%pyproject_save_files -l efel
aab7af1
aee971f
aee971f
%check
aab7af1
%pyproject_check_import
aee971f
%if %{with tests}
c046d95
# https://github.com/BlueBrain/eFEL/blob/master/Makefile#L36: is obsolete
c046d95
%pytest
aee971f
%endif
aee971f
aab7af1
%files -n python3-efel -f %{pyproject_files}
aab7af1
%exclude %{python3_sitearch}/efel/cppcore/
882ca84
%doc README.md
aee971f
aee971f
%changelog
8bbd767
%autochangelog