Blob Blame History Raw
%bcond_without tests

%global commit 7a64bc7fb131fbc4ee12a457d8e7355c66b3dd0c
%global shortcommit %(c=%{commit}; echo ${c:0:7}) 

%global pypi_name pyelectro

%global _description %{expand:
Tool for analysis of electrophysiology in Python.

This package was originally developed by Mike Vella. This has been updated by
Padraig Gleeson and others (and moved to NeuralEnsemble) to continue
development of pyelectro and Neurotune for use in OpenWorm, Open Source Brain
and other projects.}

Name:           python-%{pypi_name}
Version:        0.1.9
Release:        20190720git%{shortcommit}%{?dist}
Summary:        A library for analysis of electrophysiological data

License:        BSD
URL:  {pypi_name}

BuildArch:      noarch


%description %_description

%package -n python3-%{pypi_name}
Summary:        %{summary}
BuildRequires:  python3-devel

# For documentation
BuildRequires:  %{py3_dist sphinx}
BuildRequires:  %{py3_dist scipy}
BuildRequires:  %{py3_dist numpy}
BuildRequires:  %{py3_dist matplotlib}
BuildRequires:  %{py3_dist nose}
BuildRequires:  %{py3_dist mock}

Requires:       %{py3_dist scipy}
Requires:       %{py3_dist numpy}
Requires:       %{py3_dist matplotlib}
%{?python_provide:%python_provide python3-%{pypi_name}}

%description -n python3-%{pypi_name} %_description

%package doc
Summary:        %{summary}

%description doc
Documentation for %{name}.

%autosetup -n %{pypi_name}-%{commit}
rm -rf %{pypi_name}.egg-info

# Comment out to remove /usr/bin/env shebangs
# Can use something similar to correct/remove /usr/bin/python shebangs also
# find . -type f -name "*.py" -exec sed -i '/^#![  ]*\/usr\/bin\/env.*$/ d' {} 2>/dev/null ';'


make -C doc SPHINXBUILD=sphinx-build-3 html
rm -rf doc/_build/html/{.doctrees,.buildinfo} -vf


%if %{with tests}

%files -n python3-%{pypi_name}

%files doc
%doc doc/_build/html

* Sat Jul 20 2019 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 0.1.9-20190720git7a64bc7
- Initial build