diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..9b19550 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/python-pyelectro-7a64bc7.tar.gz diff --git a/python-pyelectro.spec b/python-pyelectro.spec new file mode 100644 index 0000000..8e98efc --- /dev/null +++ b/python-pyelectro.spec @@ -0,0 +1,88 @@ +%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: https://github.com/NeuralEnsemble/%{pypi_name} +Source0: https://github.com/NeuralEnsemble/%{pypi_name}/archive/%{commit}/%{name}-%{shortcommit}.tar.gz + +BuildArch: noarch + +%{?python_enable_dependency_generator} + +%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}. + +%prep +%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 ';' + +%build +%py3_build + +make -C doc SPHINXBUILD=sphinx-build-3 html +rm -rf doc/_build/html/{.doctrees,.buildinfo} -vf + +%install +%py3_install + +%check +%if %{with tests} +nosetests-%{python3_version} +%endif + +%files -n python3-%{pypi_name} +%doc README.md +%{python3_sitelib}/%{pypi_name}-%{version}-py%{python3_version}.egg-info +%{python3_sitelib}/%{pypi_name} + +%files doc +%doc doc/_build/html + +%changelog +* Sat Jul 20 2019 Ankur Sinha - 0.1.9-20190720git7a64bc7 +- Initial build diff --git a/sources b/sources new file mode 100644 index 0000000..fc0bfb9 --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (python-pyelectro-7a64bc7.tar.gz) = 0763f24c5188f3af2242b80a990601f438cd0413f1d8bc23f4071a1a1b549258132cca5b940786500b7d47e2a4e8bd5120db618c455c36612a994b52cbe49659