## START: Set by rpmautospec ## (rpmautospec version 0.7.2) ## 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 # Circular dependencies in the testing chain %if 0%{?epel} == 9 %bcond_with test %else %bcond_without test %endif Name: python-backports-tarfile Version: 1.2.0 Release: %autorelease Summary: Backport of CPython tarfile module License: MIT URL: https://github.com/jaraco/backports.tarfile Source: %{pypi_source backports_tarfile} BuildArch: noarch BuildRequires: python3-devel BuildRequires: python3-test BuildRequires: tomcli %global _description %{expand: Backport of CPython tarfile module.} %description %_description %package -n python3-backports-tarfile Summary: %{summary} %description -n python3-backports-tarfile %_description %prep %autosetup -p1 -n backports_tarfile-%{version} # Remove dev dependencies tomcli set pyproject.toml lists delitem "project.optional-dependencies.testing" "pytest-.*" %if 0%{?epel} == 9 # Change the build backend in EPEL9 because `setuptools>=61.2` is needed for PEP621 tomcli set pyproject.toml lists str "build-system.requires" "hatchling" "hatch-vcs" tomcli set pyproject.toml str "build-system.build-backend" "hatchling.build" tomcli set pyproject.toml str "tool.hatch.version.source" "vcs" tomcli set pyproject.toml lists str "tool.hatch.build.targets.wheel.packages" "backports" %endif sed -i "s/\\('-m', 'backports.tarfile',\\)/\\1 __cleanenv=False,/g" tests/test_tarfile.py %generate_buildrequires %pyproject_buildrequires %{?with_test:-x testing} %build %pyproject_wheel %install %pyproject_install %pyproject_save_files backports %check %pyproject_check_import %if %{with test} %pytest %endif %files -n python3-backports-tarfile -f %{pyproject_files} %license LICENSE %doc README.rst %changelog ## START: Generated by rpmautospec * Fri Sep 20 2024 John Doe - 1.2.0-1 - Uncommitted changes ## END: Generated by rpmautospec