File python-efel.spec of Package python-efel

#
# spec file for package python-efel
#
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/


%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%bcond_with     test
Name:           python-efel
Version:        2.12.11
Release:        0
License:        LGPL-3.0
Summary:        Electrophys Feature Extract Library (eFEL)
Url:            https://github.com/BlueBrain/eFEL
Group:          Development/Languages/Python
Source:         https://files.pythonhosted.org/packages/source/e/efel/efel-%{version}.tar.gz
BuildRequires:  c++_compiler
BuildRequires:  cmake
BuildRequires:  python-rpm-macros
BuildRequires:  %{python_module devel}
BuildRequires:  %{python_module numpy-devel >= 1.6}
BuildRequires:  %{python_module setuptools}
BuildRequires:  fdupes
%if %{with test}
BuildRequires:  %{python_module six}
%endif
Requires:       python-numpy >= 1.6
Requires:       python-six
Suggests:       python-neo >= 0.5.1

%python_subpackages

%description
The Electrophys Feature Extract Library (eFEL) allows neuroscientists
to automatically extract features from time series data recorded from
neurons (both in vitro and in silico). Examples are the action
potential width and amplitude in voltage traces recorded during
whole-cell patch clamp experiments. The user of the library provides
a set of traces and selects the features to be calculated. The library
will then extract the requested features and return the values to the
user.

%package devel
Summary:        Development files for %{name}
Group:          Development/Languages/Python
Requires:       %{name} = %{version}
Requires:       c++_compiler
Requires:       python-devel
Requires:       python-numpy-devel >= 1.6

%description devel
Development files and headers for efel.

%prep
%setup -q -n efel-%{version}

%build
export CFLAGS="%{optflags}"
%python_build

%install
%python_install
%python_expand %fdupes %{buildroot}%{$python_sitearch}

%if %{with test}
%check
%python_exec setup.py test
%endif

%files %{python_files}
%defattr(-,root,root,-)
%{python_sitearch}/efel-%{version}-py*.egg-info
%{python_sitearch}/efel/
%exclude %{python_sitearch}/efel/cppcore/*.h

%files %{python_files devel}
%defattr(-,root,root,-)
%{python_sitearch}/efel/cppcore/*.h

%changelog
openSUSE Build Service is sponsored by