# py-metronome, a metronome with accents, subdivisions and tap tempo. # Copyright (C) 2026 Nicolas Vaughan # # This program is free software: you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by the # Free Software Foundation, either version 3 of the License, or (at your # option) any later version. This program is distributed WITHOUT ANY # WARRANTY; see the LICENSE file, or . # # Build with packaging/build-rpm.sh, which makes the source tarball. Name: py-metronome Version: 0.1.1 Release: 1%{?dist} Summary: A metronome with accents, subdivisions, tap tempo and animations License: GPL-3.0-or-later URL: https://github.com/nivaca/py-metronome Source0: %{name}-%{version}.tar.gz BuildArch: noarch BuildRequires: python3-devel BuildRequires: desktop-file-utils BuildRequires: /usr/bin/appstreamcli # For %%check: the tests run the window (headless) and the terminal interface # (in a pseudo-terminal). BuildRequires: python3-pytest BuildRequires: python3-pyside6 # numpy and sounddevice (with PortAudio) come from the package's metadata (pyproject.toml). # The window: Fedora's PySide6 (pyproject.toml names the PyPI wheel, pyside6-essentials). Requires: python3-pyside6 Requires: hicolor-icon-theme %description py-metronome is a metronome from 20 to 300 beats per minute, with 1 to 16 beats in a bar, an accented first beat, subdivisions (eighths, triplets, sixteenths), a tempo tapped with the beat, seven sounds (wood, woodblock, cowbell, claves, hi-hat, beep, click) and a volume boost. Each click falls on its exact sample, without drift, and every change is heard from the next click. An animation (a pendulum, a bouncing ball, a sweep, the bar's progress, a flash or a conductor's pattern) arrives with each beat heard. It runs in a window, in a full-screen terminal or on the command line, which can also write the clicks to a WAV file, in English or Spanish. %prep %autosetup -n %{name}-%{version} # (Fedora's PySide6 is python3-pyside6, which doesn't provide pyside6-essentials) sed -i -e '/"pyside6-essentials/d' pyproject.toml %generate_buildrequires %pyproject_buildrequires %build %pyproject_wheel %install %pyproject_install %pyproject_save_files -l py_metronome desktop-file-install --dir=%{buildroot}%{_datadir}/applications packaging/py-metronome.desktop install -d %{buildroot}%{_datadir}/icons cp -pr src/py_metronome/icons/linux/hicolor %{buildroot}%{_datadir}/icons/ install -Dpm 0644 packaging/io.github.nivaca.py-metronome.metainfo.xml \ %{buildroot}%{_metainfodir}/io.github.nivaca.py-metronome.metainfo.xml install -Dpm 0644 packaging/man/py-metronome.1 %{buildroot}%{_mandir}/man1/py-metronome.1 install -Dpm 0644 packaging/man/es/py-metronome.1 %{buildroot}%{_mandir}/es/man1/py-metronome.1 %check desktop-file-validate %{buildroot}%{_datadir}/applications/py-metronome.desktop appstreamcli validate --no-net %{buildroot}%{_metainfodir}/io.github.nivaca.py-metronome.metainfo.xml export QT_QPA_PLATFORM=offscreen %pyproject_check_import # The whole test suite, on the installed package, with no settings of the # builder's and the window drawn offscreen: each test file in a pytest of its # own, as many at once as the build may use (tools/test.py). export HOME="$PWD/check-home" %{py3_test_envvars} %{python3} tools/test.py -j %{_smp_build_ncpus} %{py3_test_envvars} %{buildroot}%{_bindir}/py-metronome --version | grep -q '%{version}' %files -f %{pyproject_files} %doc README.md README_es.md docs/DESCRIPTION.md docs/DESCRIPCIƓN_es.md docs/MANUAL_en.pdf docs/MANUAL_es.pdf %{_bindir}/py-metronome %{_datadir}/applications/py-metronome.desktop %{_datadir}/icons/hicolor/*/apps/py-metronome.* %{_metainfodir}/io.github.nivaca.py-metronome.metainfo.xml %{_mandir}/man1/py-metronome.1* %lang(es) %{_mandir}/es/man1/py-metronome.1* %changelog * Sun Nov 29 2026 Nicolas Vaughan - 0.1.1-1 - A new icon: a pendulum at one end of its swing, and four beats * Sun Nov 29 2026 Nicolas Vaughan - 0.1.0-2 - Keywords of the menu entry without the generic name, which the desktop-file-validate of Rawhide warns about * Sun Nov 29 2026 Nicolas Vaughan - 0.1.0-1 - First package: the window, the terminal interface and the command line, in English or Spanish