%global forgeurl https://github.com/yboetz/pyznap Version: 1.6.0 %forgemeta Name: pyznap Release: %autorelease Summary: ZFS snapshot tool written in python License: GPL-3.0-only URL: %{forgeurl} Source0: %{forgesource} BuildArch: noarch BuildRequires: python3-devel BuildRequires: python3dist(pytest) BuildRequires: python3dist(paramiko) Recommends: mbuffer Recommends: openssh-clients Recommends: pv %global _description %{expand: pyznap is a ZFS snapshot management tool. It automatically takes and deletes snapshots and can send them to different backup locations. You can specify a policy for a given filesystem in the pyznap.conf file and then use cron to let it run regularly.} %description %_description %package -n python3-%{name} Summary: %{summary} %description -n python3-%{name} %_description %prep %forgeautosetup -p1 # Remove shebang from main.py sed -i '\|#!/usr/bin/env python|d' pyznap/main.py %generate_buildrequires %pyproject_buildrequires %build %pyproject_wheel %install %pyproject_install %pyproject_save_files %{name} install -Dpm 0644 pyznap/config/pyznap.conf %{buildroot}%{_sysconfdir}/pyznap/pyznap.conf %check # only run tests that do not create zpools %pytest tests/test_functions.py -k 'test_read_config or test_parse_name' %files -f %{pyproject_files} %license LICENSE %doc README.md %{_bindir}/pyznap %config(noreplace) %{_sysconfdir}/pyznap/pyznap.conf %changelog %autochangelog