15
0

Eliminate the need for setuptools_scm by adding no-setuptools_scm.patch.

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-iniconfig?expand=0&rev=23
This commit is contained in:
2025-12-10 09:54:00 +00:00
committed by Git OBS Bridge
parent 09bfe05024
commit 049dbe02fd
3 changed files with 38 additions and 4 deletions

27
no-setuptools_scm.patch Normal file
View File

@@ -0,0 +1,27 @@
---
pyproject.toml | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
Index: iniconfig-2.3.0/pyproject.toml
===================================================================
--- iniconfig-2.3.0.orig/pyproject.toml 2025-12-10 10:43:39.982953641 +0100
+++ iniconfig-2.3.0/pyproject.toml 2025-12-10 10:52:41.551397217 +0100
@@ -2,7 +2,6 @@
build-backend = "setuptools.build_meta"
requires = [
"setuptools>=77",
- "setuptools-scm>=8",
]
[project]
@@ -49,8 +48,8 @@
[tool.setuptools.package-data]
iniconfig = [ "py.typed" ]
-[tool.setuptools_scm]
-write_to = "src/iniconfig/_version.py"
+[tool.setuptools.dynamic]
+version = { attr = "iniconfig._version.__version__" }
[tool.ruff]

View File

@@ -1,3 +1,9 @@
-------------------------------------------------------------------
Wed Dec 10 09:30:44 UTC 2025 - Matej Cepl <mcepl@cepl.eu>
- Eliminate the need for setuptools_scm by adding
no-setuptools_scm.patch.
-------------------------------------------------------------------
Thu Dec 4 10:02:05 UTC 2025 - John Paul Adrian Glaubitz <adrian.glaubitz@suse.com>

View File

@@ -1,7 +1,7 @@
#
# spec file for package python-iniconfig
#
# Copyright (c) 2025 SUSE LLC
# Copyright (c) 2025 SUSE LLC and contributors
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -16,7 +16,6 @@
#
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%global flavor @BUILD_FLAVOR@%{nil}
%if "%{flavor}" == "test"
%define psuffix -%{flavor}
@@ -35,10 +34,12 @@ Group: Development/Languages/Python
URL: https://github.com/RonnyPfannschmidt/iniconfig
Source: https://files.pythonhosted.org/packages/source/i/iniconfig/iniconfig-%{version}.tar.gz
Source1: https://github.com/pytest-dev/iniconfig/archive/refs/tags/v%{version}.tar.gz#/iniconfig-%{version}-tests.tar.gz
# PATCH-FIX-OPENSUSE no-setuptools_scm.patch mcepl@suse.com
# don't use setuptools_scm
Patch0: no-setuptools_scm.patch
BuildRequires: %{python_module base >= 3.8}
BuildRequires: %{python_module pip}
BuildRequires: %{python_module setuptools >= 77}
BuildRequires: %{python_module setuptools-scm >= 8}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
BuildArch: noarch
@@ -61,7 +62,7 @@ having a unique set of features:
* iniconfig raises an Error if two sections have the same name.
%prep
%setup -q -n iniconfig-%{version} -a1
%autosetup -p1 -n iniconfig-%{version} -a1
%if !%{with test}
%build