## START: Set by rpmautospec ## (rpmautospec version 0.2.5) %define autorelease(e:s:pb:) %{?-p:0.}%{lua: release_number = 1; base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}")); print(release_number + base_release_number - 1); }%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{?dist} ## END: Set by rpmautospec # Require mpi for tests, and seem to hang in Mock, so disabled by default %bcond_with tests %global _description %{expand: \ SpyKING CIRCUS is a python code to allow fast spike sorting on multi channel recordings. A publication on the algorithm can be found at https://elifesciences.org/articles/34518. It has been tested on datasets coming from in vitro retina with 252 electrodes MEA, from in vivo hippocampus with tetrodes, in vivo and in vitro cortex data with 30 and up to 4225 channels, with good results. Synthetic tests on these data show that cells firing at more than 0.5Hz can be detected, and their spikes recovered with error rates at around 1%, even resolving overlapping spikes and synchronous firing. It seems to be compatible with optogenetic stimulation, based on experimental data obtained in the retina.} %global forgeurl https://github.com/spyking-circus/spyking-circus Name: python-spyking-circus Version: 1.1.0 Release: %autorelease Summary: Fast and scalable spike sorting of large-scale extracellular recordings %global tag %{version} %forgemeta License: CeCILL URL: %forgeurl Source0: %forgesource # We install the probe files to datadir Patch0: set-probe-datadir.patch BuildArch: noarch %description %_description %package -n python3-spyking-circus Summary: %{summary} BuildRequires: python3-devel BuildRequires: /usr/bin/patch %if %{with tests} BuildRequires: mpich-devel BuildRequires: python3-mpi4py-mpich BuildRequires: openmpi-devel BuildRequires: python3-mpi4py-openmpi BuildRequires: python3-pytest %endif %description -n python3-spyking-circus %_description %package -n python3-spyking-circus-common Summary: Common files for %{name} %description -n python3-spyking-circus-common %_description # MPICH meta package %package -n python3-spyking-circus-mpich Summary: Meta package for %{name} Requires: python3-mpi4py-mpich Requires: python3-spyking-circus%{?_isa} = %{version}-%{release} %description -n python3-spyking-circus-mpich %_description # OpenMPI meta package %package -n python3-spyking-circus-openmpi Summary: Meta package for %{name} Requires: python3-mpi4py-openmpi Requires: python3-spyking-circus%{?_isa} = %{version}-%{release} %description -n python3-spyking-circus-openmpi %_description %prep %forgeautosetup -S patch # Set the path to datadir sed -i "s|SED_ME|%{_datadir}/spyking-circus/|" setup.py # remove mpi4py from requires, we add it manually sed -i "s/'mpi4py', //" setup.py # Remove env find . -type f -name "*.py" -exec sed -i '/^#![ ]*\/usr\/bin\/env.*$/ d' {} 2>/dev/null ';' # Remove nose from tests: we use pytest sed -i 's/nose,//' tests/__init__.py %generate_buildrequires %pyproject_buildrequires -r %build %pyproject_wheel %install %pyproject_install # remove duplicate installed files mkdir -m 0755 -p $RPM_BUILD_ROOT/%{_datadir}/spyking-circus/ mv $RPM_BUILD_ROOT/%{python3_sitelib}/usr/share/spyking-circus/* $RPM_BUILD_ROOT/%{_datadir}/spyking-circus/ rm -rf $RPM_BUILD_ROOT/%{python3_sitelib}/usr/ %pyproject_save_files circus %check %if %{with tests} %{_mpich_load} %{pytest} tests/ %{_mpich_unload} %{_openmpi_load} %{pytest} tests/ %{_openmpi_unload} %endif %files -n python3-spyking-circus -f %{pyproject_files} %doc README.rst %{_bindir}/circus-artefacts %{_bindir}/circus-folders %{_bindir}/circus-gui-matlab %{_bindir}/circus-gui-python %{_bindir}/circus-multi %{_bindir}/spyking-circus %{_bindir}/spyking-circus-launcher %{_bindir}/spyking-circus-subtask %{_datadir}/spyking-circus %changelog * Sun Jan 16 2022 Ankur Sinha (Ankur Sinha Gmail) 1.1.0-1 - feat: update to 1.1.0 * Fri Jul 23 2021 Fedora Release Engineering - 0.9.7-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild * Fri Jun 04 2021 Python Maint - 0.9.7-5 - Rebuilt for Python 3.10 * Wed Jan 27 2021 Fedora Release Engineering - 0.9.7-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild * Wed Jul 29 2020 Fedora Release Engineering - 0.9.7-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild * Tue May 26 2020 Miro HronĨok - 0.9.7-2 - Rebuilt for Python 3.9 * Sun Apr 26 2020 Ankur Sinha - 0.9.7-1 - Update for review - Remove mpi4py from auto-requires: we add them explicitly for the mpi implementations - Correct readme.txt * Sat Apr 25 2020 Ankur Sinha - 0.9.7-1 - Initial build