## START: Set by rpmautospec ## (rpmautospec version 0.7.3) ## RPMAUTOSPEC: autorelease, autochangelog %define autorelease(e:s:pb:n) %{?-p:0.}%{lua: release_number = 7; base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}")); print(release_number + base_release_number - 1); }%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}} ## END: Set by rpmautospec Name: python-bioread Version: 3.0.1 Release: %autorelease Summary: Utilities to read BIOPAC AcqKnowledge files # SPDX License: MIT URL: https://github.com/uwmadison-chm/bioread # The GitHub archive contains data required for running the tests, which the # PyPI sdists lack. Source: %{url}/archive/v%{version}/bioread-%{version}.tar.gz BuildArch: noarch BuildRequires: python3-devel # We could use the unittest module to run the tests, but pytest is more flexible. BuildRequires: %{py3_dist pytest} BuildRequires: help2man %global common_description %{expand: These utilities are for reading the files produced by BIOPAC’s AcqKnowledge software. Much of the information is based on Application Note 156 from BIOPAC; however, newer file formats were decoded through the tireless efforts of John Ollinger and Nate Vack. This library is mostly concerned with getting you the data, and less so with interpreting UI-related header values.} %description %{common_description} %package -n python3-bioread Summary: %{summary} %description -n python3-bioread %{common_description} %pyproject_extras_subpkg -n python3-bioread mat hdf5 all %prep %autosetup -n bioread-%{version} # Upstream may like to run these as scripts during development, but they will # be installed under site-packages without executable permissions, so we should # remove the shebangs. find bioread/runners/ -type f -name '*.py' -exec sed -r -i '1{/^#!/d}' '{}' '+' # We might as well go ahead and drop the executable bit while we’re at it. find bioread/runners/ -type f -perm /0111 -exec chmod -v a-x '{}' '+' %generate_buildrequires %pyproject_buildrequires -x all %build %pyproject_wheel %install %pyproject_install %pyproject_save_files -l bioread # Do this in %%install rather than %%build because we need the entry points: install -d '%{buildroot}%{_mandir}/man1' for bin in acq2hdf5 acq2mat acq2txt acq_info acq_markers do PYTHONPATH='%{buildroot}%{python3_sitelib}' help2man \ --no-info \ --version-string='%{version}' \ --output="%{buildroot}%{_mandir}/man1/${bin}.1" \ "%{buildroot}%{_bindir}/${bin}" done %check %pytest -k "${k-}" -v %files -n python3-bioread -f %{pyproject_files} %doc README.md %doc examples/ %{_bindir}/acq2hdf5 %{_bindir}/acq2mat %{_bindir}/acq2txt %{_bindir}/acq_info %{_bindir}/acq_markers %{_mandir}/man1/acq2hdf5.1* %{_mandir}/man1/acq2mat.1* %{_mandir}/man1/acq2txt.1* %{_mandir}/man1/acq_info.1* %{_mandir}/man1/acq_markers.1* %changelog ## START: Generated by rpmautospec * Fri Jul 19 2024 Fedora Release Engineering - 3.0.1-7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild * Sat Jun 08 2024 Python Maint - 3.0.1-6 - Rebuilt for Python 3.13 * Fri Jan 26 2024 Fedora Release Engineering - 3.0.1-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild * Sun Jan 21 2024 Fedora Release Engineering - 3.0.1-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild * Sun Dec 17 2023 Benjamin A. Beasley - 3.0.1-2 - Assert that %%pyproject_files contains a license file * Tue Nov 21 2023 Benjamin A. Beasley - 3.0.1-1 - Initial package (close RHBZ#2250700) ## END: Generated by rpmautospec