8e2691a
Name:           python-pyspike
8e2691a
Version:        0.8.0
8e2691a
Release:        %autorelease
8e2691a
Summary:        Library for the numerical analysis of spike train similarity
8e2691a
8e2691a
License:        BSD-2-Clause
8e2691a
URL:            https://github.com/mariomulansky/PySpike
8e2691a
Source:         %{url}/archive/%{version}/PySpike-%{version}.tar.gz
8e2691a
8e2691a
# Adapt numpy_include proxy for Cython 3 by making it an os.PathLike
8e2691a
# https://github.com/mariomulansky/PySpike/pull/75
8e2691a
# See also:
8e2691a
# https://github.com/mariomulansky/PySpike/pull/68
8e2691a
Patch:          %{url}/pull/75.patch
8e2691a
# Exclude tests from packages
8e2691a
# https://github.com/mariomulansky/PySpike/pull/76
8e2691a
Patch:          %{url}/pull/76.patch
8e2691a
# In setup.cfg, replace deprecated metadata.description-file
8e2691a
# https://github.com/mariomulansky/PySpike/pull/77
8e2691a
Patch:          %{url}/pull/77.patch
8e2691a
8e2691a
BuildRequires:  python3-devel
8e2691a
BuildRequires:  %{py3_dist Cython}
8e2691a
BuildRequires:  gcc
8e2691a
8e2691a
# Test dependencies are documented in Readme.rst:
8e2691a
BuildRequires:  %{py3_dist pytest}
8e2691a
BuildRequires:  %{py3_dist scipy}
1ba23c0
1ba23c0
%global _description %{expand:
1ba23c0
PySpike is a Python library for the numerical analysis of spike train
8e2691a
similarity. Its core functionality is the implementation of the ISI-distance[1]
8e2691a
and SPIKE-distance[2], SPIKE-Synchronization [3], as well as their adaptive
8e2691a
generalizations[4]. It provides functions to compute multivariate profiles,
8e2691a
distance matrices, as well as averaging and general spike train processing. All
8e2691a
computation intensive parts are implemented in C via Cython to reach a
8e2691a
competitive performance (factor 100-200 over plain Python).
1ba23c0
1ba23c0
PySpike provides the same fundamental functionality as the SPIKY framework for
1ba23c0
Matlab, which additionally contains spike-train generators, more spike train
1ba23c0
distance measures and many visualization routines.
1ba23c0
1ba23c0
If you use PySpike in your research, please cite our SoftwareX publication on
1ba23c0
PySpike:
1ba23c0
8e2691a
Mario Mulansky, Thomas Kreuz, *PySpike - A Python library for analyzing spike
8e2691a
train synchrony*, Software X 5, 183 (2016)
1ba23c0
1ba23c0
Additionally, depending on the used methods: ISI-distance [1], SPIKE-distance
8e2691a
[2], SPIKE-Synchronization [3], or their adaptive generalizations [4], please
8e2691a
cite one or more of the following publications:
1ba23c0
1ba23c0
[1] Kreuz T, Haas JS, Morelli A, Abarbanel HDI, Politi A, Measuring spike train
1ba23c0
synchrony. J Neurosci Methods 165, 151 (2007)
1ba23c0
1ba23c0
[2] Kreuz T, Chicharro D, Houghton C, Andrzejak RG, Mormann F, Monitoring spike
1ba23c0
train synchrony. J Neurophysiol 109, 1457 (2013)
1ba23c0
8e2691a
[3] Kreuz T, Mulansky M and Bozanic N, *SPIKY: A graphical user interface for
8e2691a
monitoring spike train synchrony*, J Neurophysiol 113, 3432 (2015)
1ba23c0
8e2691a
[4] Satuvuori E, Mulansky M, Bozanic N, Malvestio I, Zeldenrust F, Lenk K, and
8e2691a
Kreuz T, Measures of spike train synchrony for data with multiple time-scales,
8e2691a
J Neurosci Methods 287, 25 (2017)
1ba23c0
8e2691a
Documentation is available at http://mariomulansky.github.io/PySpike/}
1ba23c0
1ba23c0
%description %_description
1ba23c0
ca7bd34
%package -n python3-pyspike
1ba23c0
Summary:        %{summary}
1ba23c0
ca7bd34
%description -n python3-pyspike %_description
1ba23c0
1ba23c0
%prep
8e2691a
%autosetup -n PySpike-%{version} -p1
8e2691a
8e2691a
# Remove Cythonized C sources
8e2691a
# https://docs.fedoraproject.org/en-US/packaging-guidelines/Python/#_using_cython
8e2691a
find . -type f -exec grep -FrinIl 'Generated by Cython' '{}' '+' |
8e2691a
  xargs -r -t rm -v
1ba23c0
1ba23c0
# Comment out to remove /usr/bin/env shebangs
1ba23c0
# Can use something similar to correct/remove /usr/bin/python shebangs also
1ba23c0
# find . -type f -name "*.py" -exec sed -i '/^#![  ]*\/usr\/bin\/env.*$/ d' {} 2>/dev/null ';'
1ba23c0
f25519d
%generate_buildrequires
8e2691a
%pyproject_buildrequires
f25519d
1ba23c0
%build
f25519d
%pyproject_wheel
1ba23c0
1ba23c0
%install
f25519d
%pyproject_install
f25519d
%pyproject_save_files pyspike
1ba23c0
1ba23c0
%check
8e2691a
%pytest -v
1ba23c0
f25519d
%files -n python3-pyspike -f %{pyproject_files}
1ba23c0
%license License.txt
8e2691a
%doc Readme.rst
8e2691a
%doc Changelog
8e2691a
%doc Contributors.txt
8e2691a
%doc examples/
1ba23c0
1ba23c0
%changelog
ad21822
%autochangelog