diff --git a/Replace-hatchling-with-setuptools-scm-build-backend.patch b/Replace-hatchling-with-setuptools-scm-build-backend.patch new file mode 100644 index 0000000..c381443 --- /dev/null +++ b/Replace-hatchling-with-setuptools-scm-build-backend.patch @@ -0,0 +1,44 @@ +From 3b38f9e81ed1f9f0a94657629f85352c596e3337 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Hrn=C4=8Diar?= +Date: Mon, 1 Sep 2025 20:47:22 +0200 +Subject: [PATCH] Replace hatchling with setuptools-scm build backend + +--- + pyproject.toml | 9 +++------ + 1 file changed, 3 insertions(+), 6 deletions(-) + +diff --git a/pyproject.toml b/pyproject.toml +index 78dcdc8..5ae2135 100644 +--- a/pyproject.toml ++++ b/pyproject.toml +@@ -1,9 +1,6 @@ + [build-system] +-build-backend = "hatchling.build" +-requires = [ +- "hatch-vcs", +- "hatchling>=1.26", +-] ++build-backend = "setuptools.build_meta" ++requires = ["setuptools>=77", "setuptools_scm"] + + [project] + name = "iniconfig" +@@ -21,7 +18,6 @@ dynamic = [ + classifiers = [ + "Development Status :: 4 - Beta", + "Intended Audience :: Developers", +- "License :: OSI Approved :: MIT License", + "Operating System :: MacOS :: MacOS X", + "Operating System :: Microsoft :: Windows", + "Operating System :: POSIX", +@@ -62,6 +58,7 @@ default = "pytest {args}" + python = ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"] + + [tool.setuptools_scm] ++version_file = "src/iniconfig/_version.py" + + [tool.mypy] + strict = true +-- +2.49.0 + diff --git a/changelog b/changelog deleted file mode 100644 index 3f2f4f5..0000000 --- a/changelog +++ /dev/null @@ -1,53 +0,0 @@ -* Fri Jan 26 2024 Fedora Release Engineering - 1.1.1-16 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild - -* Mon Jan 22 2024 Fedora Release Engineering - 1.1.1-15 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild - -* Fri Jul 21 2023 Fedora Release Engineering - 1.1.1-14 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild - -* Fri Jun 16 2023 Python Maint - 1.1.1-13 -- Rebuilt for Python 3.12 - -* Tue Jun 13 2023 Python Maint - 1.1.1-12 -- Bootstrap for Python 3.12 - -* Fri Jan 20 2023 Fedora Release Engineering - 1.1.1-11 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild - -* Thu Dec 08 2022 Lumír Balhar - 1.1.1-10 -- Fix build with pytest 7.2 and tox 4 - -* Fri Jul 22 2022 Fedora Release Engineering - 1.1.1-9 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild - -* Mon Jun 13 2022 Python Maint - 1.1.1-8 -- Rebuilt for Python 3.11 - -* Mon Jun 13 2022 Python Maint - 1.1.1-7 -- Bootstrap for Python 3.11 - -* Fri Jan 21 2022 Fedora Release Engineering - 1.1.1-6 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild - -* Fri Jul 23 2021 Fedora Release Engineering - 1.1.1-5 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild - -* Fri Jun 04 2021 Python Maint - 1.1.1-4 -- Rebuilt for Python 3.10 - -* Wed Jun 02 2021 Python Maint - 1.1.1-3 -- Bootstrap for Python 3.10 - -* Wed Jan 27 2021 Fedora Release Engineering - 1.1.1-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild - -* Thu Oct 15 2020 Tomas Hrnciar - 1.1.1-1 -- Update to 1.1.1 (#1888157) - -* Wed Jul 29 2020 Fedora Release Engineering - 1.0.0-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild - -* Mon Jul 13 2020 Miro Hrončok - 1.0.0-1 -- Initial package (#1856421) diff --git a/plans.fmf b/plans.fmf index 365da97..5521382 100644 --- a/plans.fmf +++ b/plans.fmf @@ -3,9 +3,9 @@ discover: how: shell tests: - name: python-import-test - test: python3 -c 'import iniconfig' + test: python3.14 -c 'import iniconfig' require: - - python3-iniconfig + - python3.14-iniconfig duration: 1m execute: how: tmt diff --git a/python3.14-iniconfig.spec b/python3.14-iniconfig.spec index cfca1ee..783b14b 100644 --- a/python3.14-iniconfig.spec +++ b/python3.14-iniconfig.spec @@ -1,4 +1,6 @@ -Name: python-iniconfig +%global python3_pkgversion 3.14 + +Name: python%{python3_pkgversion}-iniconfig Version: 2.1.0 Release: %autorelease Summary: Brain-dead simple parsing of ini files @@ -6,18 +8,22 @@ Summary: Brain-dead simple parsing of ini files License: MIT URL: http://github.com/RonnyPfannschmidt/iniconfig BuildArch: noarch -BuildRequires: python3-devel +BuildRequires: python%{python3_pkgversion}-devel # pytest 6+ needs this and this uses pytest for tests -%bcond_without tests +%bcond_with tests %if %{with tests} # We BR pytest manually to avoid a dependency on tox in ELN/RHEL -BuildRequires: python3-pytest +BuildRequires: python%{python3_pkgversion}-pytest %endif Source: %{url}/archive/v%{version}/iniconfig-%{version}.tar.gz +# The package uses hatchling as a build backend. To avoid pulling +# a new dependency in RHEL we decided to patch it out and use setuptools_scm. +Patch: Replace-hatchling-with-setuptools-scm-build-backend.patch + %global _description %{expand: iniconfig is a small and simple INI-file parser module having a unique set of features: @@ -32,11 +38,6 @@ having a unique set of features: %description %_description -%package -n python3-iniconfig -Summary: %{summary} -%description -n python3-iniconfig %_description - - %prep %autosetup -n iniconfig-%{version} @@ -63,7 +64,7 @@ export SETUPTOOLS_SCM_PRETEND_VERSION=%{version} %endif -%files -n python3-iniconfig -f %{pyproject_files} +%files -n python%{python3_pkgversion}-iniconfig -f %{pyproject_files} %doc README.rst