commit 830c9da09d7e0ef340d439fecc4d0c8f10525f67 Author: tigro Date: Sat Sep 28 07:11:43 2024 +0300 import python-backports-tarfile-1.2.0-1.el9 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..76c56d0 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +SOURCES/backports_tarfile-1.2.0.tar.gz diff --git a/.python-backports-tarfile.metadata b/.python-backports-tarfile.metadata new file mode 100644 index 0000000..1cf56fa --- /dev/null +++ b/.python-backports-tarfile.metadata @@ -0,0 +1 @@ +3558f85d00164fadbd9d4112fddb4a5621782e65 SOURCES/backports_tarfile-1.2.0.tar.gz diff --git a/SPECS/python-backports-tarfile.spec b/SPECS/python-backports-tarfile.spec new file mode 100644 index 0000000..5ce70dd --- /dev/null +++ b/SPECS/python-backports-tarfile.spec @@ -0,0 +1,88 @@ +## 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: 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 +# tests are calling `python3 -m ...` which would need to keep PYTHONPATH env-var pointing to the installed package +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 +* Sat Sep 28 2024 Arkady L. Shane - 1.2.0-1 +- Rebuilt for MSVSphere 9.4 + +## START: Generated by rpmautospec +* Fri Sep 20 2024 Cristian Le - 1.2.0-1 +- import rhbz#2312851 +## END: Generated by rpmautospec