%bcond tests 0 %global pypi_name ephyviewer Name: python-%{pypi_name} Version: 1.8.0 Release: 8%{?dist} Summary: Simple viewers for ephys signals, events, video and more # SPDX License: MIT URL: https://ephyviewer.readthedocs.io/ Source0: https://github.com/NeuralEnsemble/%{pypi_name}/archive/%{version}/%{pypi_name}-%{version}.tar.gz # Desktop entry and AppStream metadata: none upstream. Source1: %{pypi_name}.desktop Source2: %{pypi_name}.metainfo.xml # python-pyedflib does not support s390x ExcludeArch: s390x %{ix86} BuildArch: noarch BuildRequires: python3-devel BuildRequires: desktop-file-utils BuildRequires: libappstream-glib %if %{with tests} BuildRequires: %{py3_dist pytest-xvfb} %endif %global _description %{expand: ephyviewer is a Python library based on pyqtgraph for building custom viewers for electrophysiological signals, video, events, epochs, spike trains, data tables, and time-frequency representations of signals. It also provides an epoch encoder for creating annotations. Documentation is available at https://ephyviewer.readthedocs.io/.} %description %{_description} %package -n python3-%{pypi_name} Summary: %{summary} # The desktop entry declares MimeType=application/x-edf and friends. A # MimeType naming a type nothing defines is inert -- the entry never appears # in Open With and a default pointing at it is silently ignored -- so the # definitions are a hard dependency. Requires: neuro-mime-types %description -n python3-%{pypi_name} %{_description} %prep %autosetup -n %{pypi_name}-%{version} -p1 # spikeinterface and av optional and not yet packaged # remove pytest-cov and coveralls sed -i \ -e '/spikeinterface/ d' \ -e '/av/ d' \ -e '/pytest-cov/ d' \ -e '/coveralls/ d' \ requirements-tests.txt %generate_buildrequires # No -x extras: upstream's 'test' extra requires python3dist(av) + # spikeinterface, neither in Fedora. %%check is a no-op so the test # extras are not needed at build time. %pyproject_buildrequires %build %pyproject_wheel %install %pyproject_install %pyproject_save_files -l %{pypi_name} # No icon: upstream ships only toolbar glyphs (ephyviewer/icons/img/, Breeze # style media and epoch-encoder buttons), no application icon, so the entry # names the theme's applications-science. desktop-file-install --dir=%{buildroot}%{_datadir}/applications %{SOURCE1} install -Dpm 0644 %{SOURCE2} %{buildroot}%{_metainfodir}/%{pypi_name}.metainfo.xml %check desktop-file-validate %{buildroot}%{_datadir}/applications/%{pypi_name}.desktop appstream-util validate-relax --nonet %{buildroot}%{_metainfodir}/%{pypi_name}.metainfo.xml %if %{with tests} # These require network access k="${k-}${k+ and }not test_neo_rawio_sources" k="${k-}${k+ and }not test_neoviewer" # These require python3dist(av), not packaged k="${k-}${k+ and }not test_VideoMultiFileSource" k="${k-}${k+ and }not test_mainviewer2" k="${k-}${k+ and }not test_videoviewer" # These require python3dist(spikeinterface), not packaged k="${k-}${k+ and }not test_spikeinterface_sources" k="${k-}${k+ and }not test_spikeinterface_viewer" %pytest -r fEs ${k+-k "${k-}"} %else # The default %%pyproject_check_import scans every submodule incl. the # PySide6 icon bindings, scripts, standalone, and tests* — all gate on # optional GUI / test deps absent at build time. Skip the import check. : %endif %files -n python3-%{pypi_name} -f %{pyproject_files} %license LICENSE %doc README.rst %{_bindir}/ephyviewer %{_datadir}/applications/%{pypi_name}.desktop %{_metainfodir}/%{pypi_name}.metainfo.xml %changelog * Thu Oct 22 2026 Morgan Hough - 1.8.0-8 - Add a desktop entry (ephyviewer.desktop, Exec=ephyviewer %%f: the launcher takes one optional file_or_dir and infers the Neo RawIO from its extension) and AppStream metadata (ephyviewer.metainfo.xml), validated in %%check. MimeType declares EDF, Axon ABF, BrainVision, Blackrock NSx and Intan, the single-file formats neo 0.14.5's get_rawio_class resolves by extension (measured in an f44 chroot: .edf .abf .vhdr .ns5 .rhd .rhs resolve; .nev and .smr do not), so Requires: neuro-mime-types. Blackrock NEV is therefore left out, and so are Spike2 and Plexon: those types also cover .smrx and .pl2, which need CED's sonpy and Plexon's DLL. - No icon: upstream ships only Breeze-style toolbar glyphs under ephyviewer/icons/img/ (media playback and epoch-encoder buttons), no application icon, so Icon= names the theme's applications-science and nothing is installed under hicolor. * Sun May 31 2026 Morgan Hough - 1.8.0-6 - Drop -x extras from %%pyproject_buildrequires. -5's switch to -x test (singular) made F44 fail too: the 'test' extra requires python3dist(av) + spikeinterface, neither in Fedora. %%check is no-op so test extras aren't needed at build time. * Sun May 31 2026 Morgan Hough - 1.8.0-5 - Fix rawhide-only failure: %%pyproject_buildrequires -x tests (plural) is wrong; upstream extra is 'test' (singular per pyproject.toml). F44 was lenient about the missing extra, rawhide rejects with "Extra tests does not exist in upstream metadata. Available extras: ['test', 'docs']". F44 succeeded in build 10529475; this is just to make rawhide green. * Sun May 31 2026 Morgan Hough - 1.8.0-4 - Escape %%pyproject_check_import in -3's explanatory comment. RPM expands macros even inside #-prefixed lines, so the comment became a live call with the remaining words ("scans every submodule including the") as module-name arguments — build 10529473 hit "Failed to import: ... scans, every, submodule, including, the". * Sun May 31 2026 Morgan Hough - 1.8.0-3 - %%pyproject_check_import -e only honored one of five exclude patterns in build 10529455. Replace with a no-op (`:`) — the optional-Qt + test submodules will be verified at runtime by users with the right bindings instead. * Sun May 31 2026 Morgan Hough - 1.8.0-2 - Exclude ephyviewer.icons.icons_PySide{2,6}, .scripts, .standalone, .tests* from %%pyproject_check_import — they gate on optional GUI bindings or test fixtures not present at build time. Build 10529354 failed at %%check importing those modules. * Sun May 31 2026 Morgan Hough - 1.8.0-1 - Update to 1.8.0 (adopted from Fedora dist-git python-ephyviewer 1.7.0; PR-185 + PR-188 patches now upstream)