## START: Set by rpmautospec ## (rpmautospec version 0.3.5) ## RPMAUTOSPEC: autorelease, autochangelog %define autorelease(e:s:pb:n) %{?-p:0.}%{lua: release_number = 2; 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-nh3 Version: 0.2.14 Release: %autorelease Summary: Python binding to Ammonia HTML sanitizer Rust crate License: MIT URL: https://github.com/messense/nh3 Source: %{pypi_source nh3} BuildRequires: cargo-rpm-macros BuildRequires: python3-devel # For tests BuildRequires: python3dist(pytest) %global _description %{expand: Python binding to Ammonia HTML sanitizer Rust crate.} %description %_description %package -n python3-nh3 Summary: %{summary} # Full license breakdown in LICENSES.dependencies License: MIT AND Apache-2.0 AND (MIT OR Apache-2.0) AND (Zlib OR Apache-2.0 OR MIT) %description -n python3-nh3 %_description %prep %autosetup -p1 -n nh3-%{version} %cargo_prep %generate_buildrequires %pyproject_buildrequires %cargo_generate_buildrequires %build export RUSTFLAGS='%{build_rustflags}' %cargo_license_summary %{cargo_license} > LICENSES.dependencies %pyproject_wheel %install %pyproject_install %pyproject_save_files nh3 %check %pytest -vv %files -n python3-nh3 -f %{pyproject_files} %license LICENSE LICENSES.dependencies %doc README.md %changelog * Sat Oct 21 2023 Mattia Verga - 0.2.14-2 - Apply requested fixes in package review * Wed Oct 18 2023 Mattia Verga - 0.2.14-1 - Initial release