## START: Set by rpmautospec ## (rpmautospec version 0.8.4) ## RPMAUTOSPEC: autorelease, autochangelog %define autorelease(e:s:pb:n) %{?-p:0.}%{lua: release_number = 1; 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 %bcond_without check Name: cargo2rpm Version: 0.3.3 Release: %autorelease Summary: Translation layer between cargo and RPM License: MIT URL: https://codeberg.org/rust2rpm/cargo2rpm Source: %{url}/archive/v%{version}.tar.gz # setup.py shim for RHEL 9 where setuptools < 61 cannot read PEP 621 # metadata from pyproject.toml, causing the package name to be UNKNOWN. Source1: setup.py # Backport Python 3.10+ syntax (match/case, X|Y type unions) for RHEL 9 # where the system Python is 3.9. Patch0: python39-compat.patch BuildArch: noarch BuildRequires: python3-devel # tomli is needed by setup.py to parse pyproject.toml on Python < 3.11 %if 0%{?rhel} && 0%{?rhel} < 10 BuildRequires: %{py3_dist tomli} %endif %if %{with check} BuildRequires: %{py3_dist pytest} %endif Requires: cargo %description cargo2rpm implements a translation layer between cargo and RPM. It provides a CLI interface (for implementing RPM macros and generators) and a Python API (which rust2rpm is built upon). %prep %autosetup -n cargo2rpm -N %if 0%{?rhel} && 0%{?rhel} < 10 %autopatch -p1 0 %endif cp %{SOURCE1} . %generate_buildrequires %pyproject_buildrequires %build %pyproject_wheel %install %pyproject_install %pyproject_save_files cargo2rpm %check %pyproject_check_import %if %{with check} %pytest %endif %files -f %{pyproject_files} %doc README.md %doc CHANGELOG.md %{_bindir}/cargo2rpm %changelog ## START: Generated by rpmautospec * Wed Apr 22 2026 Rodolfo Olivieri - 0.3.3-1 - Uncommitted changes ## END: Generated by rpmautospec