public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/python-enrich] epel10: Refactor to support epel builds
@ 2026-11-29 10:42 
  0 siblings, 0 replies; only message in thread
From:  @ 2026-11-29 10:42 UTC (permalink / raw)
  To: git-commits

A new commit has been pushed.

Repo   : rpms/python-enrich
Branch : epel10
Commit : d572e8b90e606c51f35cef56eeac2aba0de61aa7
Author : Terje Røsten <terjeros@gmail.com>
Date   : 2026-11-29T11:40:28+01:00
Stats  : +138/-146 in 8 file(s)
URL    : https://src.fedoraproject.org/rpms/python-enrich/c/d572e8b90e606c51f35cef56eeac2aba0de61aa7?branch=epel10

Log:
Refactor to support epel builds

---
diff --git a/0001-Move-reqs-into-pyproject.toml-clean-up-and-simplify-.patch b/0001-Move-reqs-into-pyproject.toml-clean-up-and-simplify-.patch
new file mode 100644
index 0000000..42ae4fe
--- /dev/null
+++ b/0001-Move-reqs-into-pyproject.toml-clean-up-and-simplify-.patch
@@ -0,0 +1,98 @@
+From 6a05d50c92e6907b2f7bbe4410eeda5722eedfab Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Terje=20R=C3=B8sten?= <terjeros@gmail.com>
+Date: Sun, 29 Nov 2026 11:17:40 +0100
+Subject: [PATCH 1/2] Move reqs into pyproject.toml, clean up and simplify
+ pytest setup
+
+---
+ .config/requirements-test.in |  5 -----
+ .config/requirements.in      |  1 -
+ pyproject.toml               | 17 ++++++++++-------
+ tox.ini                      |  1 -
+ 4 files changed, 10 insertions(+), 14 deletions(-)
+ delete mode 100644 .config/requirements-test.in
+ delete mode 100644 .config/requirements.in
+
+diff --git a/.config/requirements-test.in b/.config/requirements-test.in
+deleted file mode 100644
+index c038ac7..0000000
+--- a/.config/requirements-test.in
++++ /dev/null
+@@ -1,5 +0,0 @@
+-pytest-cov>=2.7.1
+-pytest-mock>=3.3.1
+-pytest-plus
+-pytest-xdist>=1.29.0
+-pytest>=5.4.0
+diff --git a/.config/requirements.in b/.config/requirements.in
+deleted file mode 100644
+index 5c2b8d2..0000000
+--- a/.config/requirements.in
++++ /dev/null
+@@ -1 +0,0 @@
+-rich>=10.0.0,<12.5.0 # https://github.com/pycontribs/enrich/issues/40
+diff --git a/pyproject.toml b/pyproject.toml
+index 530c296..75b6e94 100644
+--- a/pyproject.toml
++++ b/pyproject.toml
+@@ -8,7 +8,10 @@ build-backend = "setuptools.build_meta"
+ [project]
+ # https://peps.python.org/pep-0621/#readme
+ requires-python = ">=3.9"
+-dynamic = ["version", "dependencies", "optional-dependencies"]
++dynamic = ["version"]
++dependencies = [
++  "rich",
++]
+ name = "enrich"
+ description = "enrich"
+ readme = "README.md"
+@@ -39,6 +42,12 @@ classifiers = [
+ ]
+ keywords = ["console", "logging", "rich"]
+ 
++[project.optional-dependencies]
++test = [
++  "pytest-mock",
++  "pytest",
++]
++
+ 
+ [project.urls]
+ homepage = "https://github.com/pycontribs/enrich"
+@@ -63,9 +72,7 @@ warn_return_any = true
+ warn_unused_configs = true
+ 
+ [tool.pytest]
+-addopts = "--doctest-modules --durations 10 --durations-min=3 --color=yes"
+ doctest_optionflags = ["ALLOW_UNICODE", "ELLIPSIS"]
+-norecursedirs = "dist doc build .tox .eggs"
+ filterwarnings = [
+   # treat warnings as errors unless we add them below
+   "error"
+@@ -92,10 +99,6 @@ lint.select = ["ALL"]
+ [tool.ruff.lint.per-file-ignores]
+ "test/**/*.py" = ["D", "ERA", "S"]
+ 
+-[tool.setuptools.dynamic]
+-dependencies = { file = [".config/requirements.in"] }
+-optional-dependencies.test = { file = [".config/requirements-test.in"] }
+-
+ [tool.setuptools_scm]
+ local_scheme = "no-local-version"
+ tag_regex = "^(?P<prefix>v)?(?P<version>[0-9.]+)(?P<suffix>.*)?$"
+diff --git a/tox.ini b/tox.ini
+index 7c6bc6b..0057562 100644
+--- a/tox.ini
++++ b/tox.ini
+@@ -20,7 +20,6 @@ passenv =
+     TERM
+ setenv =
+     PIP_DISABLE_VERSION_CHECK=1
+-    PYTEST_REQPASS=9
+     PYTHONDONTWRITEBYTECODE=1
+     PYTHONUNBUFFERED=1
+ commands =
+-- 
+2.56.1
+

diff --git a/0002-Follow-PEP639.patch b/0002-Follow-PEP639.patch
new file mode 100644
index 0000000..35cb129
--- /dev/null
+++ b/0002-Follow-PEP639.patch
@@ -0,0 +1,33 @@
+From 60e528354cc258531ebe483a8c71c8910c5810ca Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Terje=20R=C3=B8sten?= <terjeros@gmail.com>
+Date: Sun, 29 Nov 2026 11:18:59 +0100
+Subject: [PATCH 2/2] Follow PEP639
+
+---
+ pyproject.toml | 3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
+
+diff --git a/pyproject.toml b/pyproject.toml
+index 75b6e94..7c6fced 100644
+--- a/pyproject.toml
++++ b/pyproject.toml
+@@ -19,7 +19,7 @@ authors = [{ "name" = "Sorin Sbarnea", "email" = "sorin.sbarnea@gmail.com" }]
+ maintainers = [
+   { "name" = "Sorin Sbarnea", "email" = "sorin.sbarnea@gmail.com" }
+ ]
+-license = { text = "MIT" }
++license = "MIT"
+ classifiers = [
+   # https://pypi.org/classifiers/
+   "Development Status :: 5 - Production/Stable",
+@@ -27,7 +27,6 @@ classifiers = [
+   "Intended Audience :: Developers",
+   "Intended Audience :: Information Technology",
+   "Intended Audience :: System Administrators",
+-  "License :: OSI Approved :: MIT License",
+   "Operating System :: MacOS",
+   "Operating System :: POSIX :: Linux",
+   "Operating System :: POSIX",
+-- 
+2.56.1
+

diff --git a/0002_remove_pytest_plus_dependency.patch b/0002_remove_pytest_plus_dependency.patch
deleted file mode 100644
index 823411a..0000000
--- a/0002_remove_pytest_plus_dependency.patch
+++ /dev/null
@@ -1,10 +0,0 @@
---- a/setup.cfg	2022-09-16 13:56:24.309668920 +0100
-+++ b/setup.cfg	2022-09-16 13:56:59.415026607 +0100
-@@ -65,7 +65,6 @@
- 	mock>=3.0.5
- 	pytest-cov>=2.7.1
- 	pytest-mock>=3.3.1
--	pytest-plus
- 	pytest-xdist>=1.29.0
- 	pytest>=5.4.0
- 

diff --git a/README.md b/README.md
deleted file mode 100644
index a5ae712..0000000
--- a/README.md
+++ /dev/null
@@ -1,3 +0,0 @@
-# python-enrich
-
-The python-enrich package

diff --git a/python-enrich-1.3.0-pytest.patch b/python-enrich-1.3.0-pytest.patch
deleted file mode 100644
index aafc181..0000000
--- a/python-enrich-1.3.0-pytest.patch
+++ /dev/null
@@ -1,49 +0,0 @@
-diff --git a/.config/requirements-test.in b/.config/requirements-test.in
-deleted file mode 100644
-index c038ac7..0000000
---- a/.config/requirements-test.in
-+++ /dev/null
-@@ -1,5 +0,0 @@
--pytest-cov>=2.7.1
--pytest-mock>=3.3.1
--pytest-plus
--pytest-xdist>=1.29.0
--pytest>=5.4.0
-diff --git a/.config/requirements.in b/.config/requirements.in
-deleted file mode 100644
-index 5c2b8d2..0000000
---- a/.config/requirements.in
-+++ /dev/null
-@@ -1 +0,0 @@
--rich>=10.0.0,<12.5.0 # https://github.com/pycontribs/enrich/issues/40
-diff --git a/pyproject.toml b/pyproject.toml
-index 530c296..208c8e3 100644
---- a/pyproject.toml
-+++ b/pyproject.toml
-@@ -16,7 +16,7 @@ authors = [{ "name" = "Sorin Sbarnea", "email" = "sorin.sbarnea@gmail.com" }]
- maintainers = [
-   { "name" = "Sorin Sbarnea", "email" = "sorin.sbarnea@gmail.com" }
- ]
--license = { text = "MIT" }
-+license = "MIT"
- classifiers = [
-   # https://pypi.org/classifiers/
-   "Development Status :: 5 - Production/Stable",
-@@ -24,7 +24,6 @@ classifiers = [
-   "Intended Audience :: Developers",
-   "Intended Audience :: Information Technology",
-   "Intended Audience :: System Administrators",
--  "License :: OSI Approved :: MIT License",
-   "Operating System :: MacOS",
-   "Operating System :: POSIX :: Linux",
-   "Operating System :: POSIX",
-@@ -63,9 +62,7 @@ warn_return_any = true
- warn_unused_configs = true
- 
- [tool.pytest]
--addopts = "--doctest-modules --durations 10 --durations-min=3 --color=yes"
- doctest_optionflags = ["ALLOW_UNICODE", "ELLIPSIS"]
--norecursedirs = "dist doc build .tox .eggs"
- filterwarnings = [
-   # treat warnings as errors unless we add them below
-   "error"

diff --git a/python-enrich.spec b/python-enrich.spec
index d99eb38..993cf08 100644
--- a/python-enrich.spec
+++ b/python-enrich.spec
@@ -6,8 +6,8 @@ URL:            https://github.com/pycontribs/enrich
 Source:         https://github.com/pycontribs/enrich/archive/refs/tags/v%{version}.tar.gz
 License:        MIT
 BuildArch:      noarch
-# Fix pyproject.toml and pytest setup
-Patch:          python-enrich-1.3.0-pytest.patch
+Patch0:         0001-Move-reqs-into-pyproject.toml-clean-up-and-simplify-.patch
+Patch1:         0002-Follow-PEP639.patch
 BuildRequires:  python3-devel
 BuildRequires:  python3-pytest
 BuildRequires:  python3-pytest-mock
@@ -23,7 +23,11 @@ Summary: %summary
 %description -n python3-enrich %{_description}
 
 %prep
-%autosetup -p1 -n enrich-%{version}
+%autosetup -N -n enrich-%{version}
+%autopatch -p1 0
+%if 0%{?fedora}
+%autopatch -p1 1
+%endif
 
 %generate_buildrequires
 export SETUPTOOLS_SCM_PRETEND_VERSION=%{version}

diff --git a/remove-python-mock.patch b/remove-python-mock.patch
deleted file mode 100644
index 75b20ec..0000000
--- a/remove-python-mock.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-From 916c074099c75d02cf1436462710baf63b0709bc Mon Sep 17 00:00:00 2001
-From: David Runge <dave@sleepmap.de>
-Date: Thu, 1 Dec 2022 14:42:27 +0100
-Subject: [PATCH] Remove mock from test dependencies (#46)
-
-Co-authored-by: Sorin Sbarnea <sorin.sbarnea@gmail.com>
----
- setup.cfg | 1 -
- 1 file changed, 1 deletion(-)
-
-diff --git a/setup.cfg b/setup.cfg
-index a0a8c61..5c995cc 100644
---- a/setup.cfg
-+++ b/setup.cfg
-@@ -62,8 +62,7 @@ install_requires =
- 
- [options.extras_require]
- test = 
--	mock>=3.0.5
- 	pytest-cov>=2.7.1
- 	pytest-mock>=3.3.1
- 	pytest-xdist>=1.29.0
- 	pytest>=5.4.0

diff --git a/remove-setuptools-scm-git-archive.patch b/remove-setuptools-scm-git-archive.patch
deleted file mode 100644
index 3bd4b89..0000000
--- a/remove-setuptools-scm-git-archive.patch
+++ /dev/null
@@ -1,58 +0,0 @@
-From a3611c8d1d9e5b0aa58ee3e47c78013c5be36ec5 Mon Sep 17 00:00:00 2001
-From: David Runge <dave@sleepmap.de>
-Date: Thu, 1 Dec 2022 14:39:54 +0100
-Subject: [PATCH] Update build-system requirement for setuptools-scm to >=7.0.0
- (#45)
-
-Co-authored-by: Sorin Sbarnea <sorin.sbarnea@gmail.com>
----
- pyproject.toml | 7 ++-----
- setup.cfg      | 3 +--
- setup.py       | 2 +-
- 3 files changed, 4 insertions(+), 8 deletions(-)
-
-diff --git a/pyproject.toml b/pyproject.toml
-index 1b5986b..00ccf01 100644
---- a/pyproject.toml
-+++ b/pyproject.toml
-@@ -1,10 +1,7 @@
- [build-system]
- requires = [
--  "pip >= 19.3.1",
--  "setuptools >= 42",
--  "setuptools_scm[toml] >= 3.5.0",
--  "setuptools_scm_git_archive >= 1.1",
--  "wheel >= 0.33.6",
-+  "setuptools >= 45",
-+  "setuptools_scm[toml] >= 7.0.0",
- ]
- build-backend = "setuptools.build_meta"
- 
-diff --git a/setup.cfg b/setup.cfg
-index 0fc8d3f..847617e 100644
---- a/setup.cfg
-+++ b/setup.cfg
-@@ -55,8 +55,7 @@ packages = find:
- include_package_data = True
- zip_safe = False
- setup_requires = 
--	setuptools_scm >= 1.15.0
--	setuptools_scm_git_archive >= 1.0
-+	setuptools_scm[toml]>=7.0.0
- install_requires = 
- 	rich >= 9.5.1
- 
-diff --git a/setup.py b/setup.py
-index d58a575..17927f7 100644
---- a/setup.py
-+++ b/setup.py
-@@ -13,5 +13,5 @@ site.ENABLE_USER_SITE = "--user" in sys.argv[1:]
- if __name__ == "__main__":
-     setuptools.setup(
-         use_scm_version={"local_scheme": "no-local-version"},
--        setup_requires=["setuptools_scm[toml]>=3.5.0"],
-+        setup_requires=["setuptools_scm[toml]>=7.0.0"],
-     )
--- 
-2.43.0
-

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-11-29 10:42 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-29 10:42 [rpms/python-enrich] epel10: Refactor to support epel builds 

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox