Convert from Fedora for the Python 3.14 stack in RHEL

Fedora contributions by:
    Lumír Balhar <lbalhar@redhat.com>
    Miro Hrončok <mhroncok@redhat.com>
    Tomas Hrnciar <thrnciar@redhat.com>
    Tomas Orsava <torsava@redhat.com>
This commit is contained in:
Tomáš Hrnčiar 2025-09-01 10:11:15 +02:00 committed by Lumir Balhar
parent 926593d259
commit 9ee849f91a
4 changed files with 57 additions and 65 deletions

View File

@ -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?= <thrnciar@redhat.com>
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

View File

@ -1,53 +0,0 @@
* Fri Jan 26 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.1-16
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Mon Jan 22 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.1-15
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Fri Jul 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.1-14
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
* Fri Jun 16 2023 Python Maint <python-maint@redhat.com> - 1.1.1-13
- Rebuilt for Python 3.12
* Tue Jun 13 2023 Python Maint <python-maint@redhat.com> - 1.1.1-12
- Bootstrap for Python 3.12
* Fri Jan 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.1-11
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
* Thu Dec 08 2022 Lumír Balhar <lbalhar@redhat.com> - 1.1.1-10
- Fix build with pytest 7.2 and tox 4
* Fri Jul 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.1-9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
* Mon Jun 13 2022 Python Maint <python-maint@redhat.com> - 1.1.1-8
- Rebuilt for Python 3.11
* Mon Jun 13 2022 Python Maint <python-maint@redhat.com> - 1.1.1-7
- Bootstrap for Python 3.11
* Fri Jan 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.1-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.1-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
* Fri Jun 04 2021 Python Maint <python-maint@redhat.com> - 1.1.1-4
- Rebuilt for Python 3.10
* Wed Jun 02 2021 Python Maint <python-maint@redhat.com> - 1.1.1-3
- Bootstrap for Python 3.10
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Thu Oct 15 2020 Tomas Hrnciar <thrnciar@redhat.com> - 1.1.1-1
- Update to 1.1.1 (#1888157)
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Mon Jul 13 2020 Miro Hrončok <mhroncok@redhat.com> - 1.0.0-1
- Initial package (#1856421)

View File

@ -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

View File

@ -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