%bcond tests 1 %global forgeurl https://github.com/Rogdham/pyzstd %define tag %{version} Name: python-pyzstd Version: 0.15.10 %forgemeta Release: 3%{?dist} Summary: Python bindings to Zstandard (zstd) compression library License: BSD-3-Clause URL: %{forgeurl} Source: %{forgesource} # pyzstd_pep517: name config_settings argument correctly (#2) # pyproject-rpm-macros' config_settings support passes it as a kwarg Patch: %{url}/pull/2.patch#/config_settings-fix.patch # Required for newer python-3.13 Patch: %{url}/pull/14.patch BuildRequires: gcc BuildRequires: python3-devel BuildRequires: libzstd-devel %if %{with tests} BuildRequires: %{py3_dist pytest} %endif %global _description %{expand: Pyzstd module provides classes and functions for compressing and decompressing data, using Facebook’s Zstandard (or zstd as short name) algorithm.} %description %_description %package -n python3-pyzstd Summary: %{summary} %description -n python3-pyzstd %_description %prep %autosetup -p1 %{forgesetupargs} # Ensure dynamic-link-zstd is always used sed -i 's|DYNAMIC_LINK =.*|DYNAMIC_LINK = True|' setup.py # Stop disabling debuginfo sed -i "s|'-g0', ||" setup.py # Fix non-executable-script rpmlint error sed -i -e '1{\@^#!.*@d}' src/__main__.py %generate_buildrequires %pyproject_buildrequires %build %pyproject_wheel %install %pyproject_install %pyproject_save_files pyzstd %check %pytest %files -n python3-pyzstd -f %{pyproject_files} %doc README.rst %license LICENSE %changelog * Fri Jun 14 2024 Mikel Olasagasti Uranga - 0.15.10-3 - Patch for Python-3.13 (rhbz#2276579). * Fri Jun 07 2024 Python Maint - 0.15.10-2 - Rebuilt for Python 3.13 * Sun Apr 07 2024 Maxwell G - 0.15.10-1 - Initial package (rhbz#2273823).