public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/rpkg] 1.70-1: Switch to %pyproject_* macros for Fedora releases
@ 2026-08-10 21:44 
  0 siblings, 0 replies; only message in thread
From:  @ 2026-08-10 21:44 UTC (permalink / raw)
  To: git-commits

            A new commit has been pushed.

            Repo   : rpms/rpkg
            Branch : 1.70-1
            Commit : d0af5cf8ae426249817129414a5962beeb7d31fc
            Author : Ondřej Nosek <onosek@redhat.com>
            Date   : 2025-06-25T03:09:46+00:00
            Stats  : +58/-90 in 7 file(s)
            URL    : https://src.fedoraproject.org/rpms/rpkg/c/d0af5cf8ae426249817129414a5962beeb7d31fc?branch=1.70-1

            Log:
            Switch to %pyproject_* macros for Fedora releases

So far such macros were active only for RHEL 10.
Drop the setuptools support except for python3.6 (epel8) and older.

JIRA: RHELCMP-14595

Signed-off-by: Ondřej Nosek <onosek@redhat.com>

---
diff --git a/0001-Do-not-use-pytest-related-dependencies-temporarily.patch b/0001-Do-not-use-pytest-related-dependencies-temporarily.patch
deleted file mode 100644
index 70d12b0..0000000
--- a/0001-Do-not-use-pytest-related-dependencies-temporarily.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-From 50caf547ff288d8146ea5e277ab7bfcf7e8b095c Mon Sep 17 00:00:00 2001
-From: Dominik Rumian <drumian@redhat.com>
-Date: Tue, 24 Aug 2021 16:24:47 +0200
-Subject: [PATCH] [PATCH] Do not use pytest-related dependencies temporarily
-
-Signed-off-by: Dominik Rumian <drumian@redhat.com>
----
- setup.py | 1 -
- 1 file changed, 1 deletion(-)
-
-diff --git a/setup.py b/setup.py
-index 9c6d881..557cf5f 100755
---- a/setup.py
-+++ b/setup.py
-@@ -49,7 +49,6 @@ setup(
-     license="GPLv2+",
-     url="https://pagure.io/rpkg",
-     packages=find_packages(),
--    setup_requires=['setuptools_scm', 'pytest-runner'],
-     install_requires=install_requires,
-     tests_require=tests_require,
-     dependency_links=dep_links,
--- 
-2.31.1
-

diff --git a/0001-Remove-Environment-Markers-syntax.patch b/0001-Remove-Environment-Markers-syntax.patch
new file mode 100644
index 0000000..f596ce9
--- /dev/null
+++ b/0001-Remove-Environment-Markers-syntax.patch
@@ -0,0 +1,24 @@
+From ac1c2995d17b106bbfd0ab6c84ab022da8b18e3d Mon Sep 17 00:00:00 2001
+From: Ondrej Nosek <onosek@redhat.com>
+Date: Mon, 7 Feb 2022 03:01:11 +0100
+Subject: [PATCH] Remove "Environment Markers" syntax
+
+Signed-off-by: Ondrej Nosek <onosek@redhat.com>
+---
+ requirements/test-pypi.txt | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/requirements/test-pypi.txt b/requirements/test-pypi.txt
+index 830d8c3..b732dcb 100644
+--- a/requirements/test-pypi.txt
++++ b/requirements/test-pypi.txt
+@@ -1,5 +1,5 @@
+ coverage
+-mock == 1.0.1;python_version<"3.3"
++mock == 1.0.1
+ flake8
+ pytest
+ pytest-cov
+-- 
+2.34.1
+

diff --git a/0002-Remove-pytest-coverage-execution.patch b/0002-Remove-pytest-coverage-execution.patch
deleted file mode 100644
index d746c7b..0000000
--- a/0002-Remove-pytest-coverage-execution.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/setup.cfg	2023-12-11 18:21:45.586656058 +0100
-+++ b/setup.cfg	2024-06-26 02:33:53.017645612 +0200
-@@ -5,8 +5,4 @@
- max-line-length = 100
- 
- [tool:pytest]
--# additional values for 'addopts' can be:
--# --cov-report html
--# -ra -q
--addopts = --cov=pyrpkg
- testpaths = tests

diff --git a/0003-Remove-Environment-Markers-syntax.patch b/0003-Remove-Environment-Markers-syntax.patch
deleted file mode 100644
index f596ce9..0000000
--- a/0003-Remove-Environment-Markers-syntax.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-From ac1c2995d17b106bbfd0ab6c84ab022da8b18e3d Mon Sep 17 00:00:00 2001
-From: Ondrej Nosek <onosek@redhat.com>
-Date: Mon, 7 Feb 2022 03:01:11 +0100
-Subject: [PATCH] Remove "Environment Markers" syntax
-
-Signed-off-by: Ondrej Nosek <onosek@redhat.com>
----
- requirements/test-pypi.txt | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/requirements/test-pypi.txt b/requirements/test-pypi.txt
-index 830d8c3..b732dcb 100644
---- a/requirements/test-pypi.txt
-+++ b/requirements/test-pypi.txt
-@@ -1,5 +1,5 @@
- coverage
--mock == 1.0.1;python_version<"3.3"
-+mock == 1.0.1
- flake8
- pytest
- pytest-cov
--- 
-2.34.1
-

diff --git a/remove-koji-and-rpm-py-installer-from-requires.patch b/remove-koji-and-rpm-py-installer-from-requires.patch
index 90adee0..047434d 100644
--- a/remove-koji-and-rpm-py-installer-from-requires.patch
+++ b/remove-koji-and-rpm-py-installer-from-requires.patch
@@ -12,9 +12,9 @@ diff --git a/setup.py b/setup.py
 index 9c6d881..8c92aae 100755
 --- a/setup.py
 +++ b/setup.py
-@@ -34,6 +34,11 @@ install_requires, dep_links = read_requirements(pypi_txt)
- tests_require, test_dep_links = read_requirements(test_pypi_txt)
- dep_links += test_dep_links
+@@ -29,6 +29,11 @@ test_pypi_txt = os.path.join(setup_py_path, 'requirements', 'test-pypi.txt')
+ install_requires = read_requirements(pypi_txt)
+ tests_require = read_requirements(test_pypi_txt)
  
 +install_requires = [
 +    item for item in install_requires

diff --git a/rpkg.spec b/rpkg.spec
index e01474c..f287ef9 100644
--- a/rpkg.spec
+++ b/rpkg.spec
@@ -1,6 +1,6 @@
 Name:           rpkg
 Version:        1.68
-Release:        2%{?dist}
+Release:        3%{?dist}
 
 Summary:        Python library for interacting with rpm+git
 # Automatically converted from old format: GPLv2+ and LGPLv2 - review is highly recommended.
@@ -24,7 +24,8 @@ Source0:        https://pagure.io/releases/rpkg/%{name}-%{version}.tar.gz
 %endif
 
 # No support for setup.py since Python 3.12 (RHEL 10)
-%if 0%{?rhel} >= 10
+# hatchling is supported in >Python 3.6 releases (RHEL 8)
+%if 0%{?rhel} >= 9 || 0%{?fedora} >= 41
 %global with_hatchling 1
 %else
 %global with_hatchling 0
@@ -39,11 +40,11 @@ Source0:        https://pagure.io/releases/rpkg/%{name}-%{version}.tar.gz
 # requires.txt. But, rpkg has to work in all active Fedora and EPEL releases,
 # and there is only old rpm-python package in EL6 and 7, so just simply to
 # remove rpm-py-installer for now.
+%if !0%{?with_hatchling}
 Patch0:         remove-koji-and-rpm-py-installer-from-requires.patch
-Patch1:         0001-Do-not-use-pytest-related-dependencies-temporarily.patch
-Patch2:         0002-Remove-pytest-coverage-execution.patch
+%endif
 %if 0%{?with_python2}
-Patch3:         0003-Remove-Environment-Markers-syntax.patch
+Patch1:         0001-Remove-Environment-Markers-syntax.patch
 %endif
 
 
@@ -61,14 +62,14 @@ BuildRequires:  python2-devel
 # We br these things for man page generation due to imports
 BuildRequires:  rpmlint
 BuildRequires:  rpmdevtools
-BuildRequires:  python2-koji >= 1.21
+BuildRequires:  python2-koji
 BuildRequires:  python2-cccolutils
 BuildRequires:  PyYAML
 BuildRequires:  GitPython
 BuildRequires:  python-pycurl
 BuildRequires:  python-requests
 BuildRequires:  python-requests-gssapi
-BuildRequires:  python-six >= 1.9.0
+BuildRequires:  python-six
 BuildRequires:  python2-argcomplete
 BuildRequires:  python2-mock
 BuildRequires:  python2-nose
@@ -81,13 +82,13 @@ Requires:       rpmlint
 Requires:       rpmdevtools
 Requires:       python2-argcomplete
 Requires:       python2-cccolutils
-Requires:       python2-koji >= 1.21
+Requires:       python2-koji
 Requires:       PyYAML
-Requires:       GitPython >= 0.2.0
+Requires:       GitPython
 Requires:       python-pycurl
 Requires:       python-requests
 Requires:       python-requests-gssapi
-Requires:       python-six >= 1.9.0
+Requires:       python-six
 Requires:       rpm-python
 
 Requires:       %{name}-common = %{version}-%{release}
@@ -117,7 +118,7 @@ Obsoletes:      python2-rpkg < %{version}-%{release}
 
 BuildRequires:  python3-devel
 BuildRequires:  python3-GitPython
-BuildRequires:  python3-koji >= 1.24
+BuildRequires:  python3-koji
 %if 0%{?rhel}
 BuildRequires:  python3-gobject-base
 BuildRequires:  libmodulemd
@@ -129,7 +130,7 @@ BuildRequires:  python3-argcomplete
 BuildRequires:  python3-cccolutils
 BuildRequires:  python3-openidc-client
 BuildRequires:  python3-pycurl
-BuildRequires:  python3-six >= 1.9.0
+BuildRequires:  python3-six
 BuildRequires:  python3-requests
 BuildRequires:  python3-pytest
 BuildRequires:  python3-PyYAML
@@ -150,20 +151,20 @@ Requires:       rpmlint
 Requires:       rpmdevtools
 
 Requires:       python3-argcomplete
-Requires:       python3-GitPython >= 0.2.0
+Requires:       python3-GitPython
 Requires:       python3-cccolutils
-Requires:       python3-koji >= 1.24
+Requires:       python3-koji
 %if 0%{?rhel}
 Requires:       python3-gobject-base
 Requires:       libmodulemd
 Requires:       python3-requests-gssapi
 %else
 Requires:       python3-libmodulemd
-Requires:       python3-rpmautospec >= 0.3.8
+Requires:       python3-rpmautospec
 %endif
 Requires:       python3-rpm
 Requires:       python3-pycurl
-Requires:       python3-six >= 1.9.0
+Requires:       python3-six
 Requires:       python3-PyYAML
 
 Requires:       %{name}-common = %{version}-%{release}
@@ -212,6 +213,7 @@ Common files for python2-%{name} and python3-%{name}.
 %if 0%{?with_python3}
 %if 0%{?with_hatchling}
 %pyproject_install
+%pyproject_save_files -l pyrpkg
 %else
 %py3_install
 %endif
@@ -241,33 +243,32 @@ example_cli_dir=$RPM_BUILD_ROOT%{_datadir}/%{name}/examples/cli
 %endif
 
 %if 0%{?with_python3}
+%if 0%{?with_hatchling}
+%pyproject_check_import
+%endif
 %pytest
 %endif
 
 
 %if 0%{?with_python2}
 %files -n python2-%{name}
-%doc README.rst CHANGELOG.rst
-%if 0%{?rhel} && 0%{?rhel} < 7
-%doc COPYING COPYING-koji LGPL
-%else
+%doc README.rst CONTRIBUTING.md CHANGELOG.rst
 %license COPYING COPYING-koji LGPL
-%endif
 # For noarch packages: sitelib
 %{python2_sitelib}/pyrpkg
 %{python2_sitelib}/%{name}-%{version}-py*.egg-info
 %endif
 
 %if 0%{?with_python3}
-%files -n python3-%{name}
-%doc README.rst CHANGELOG.rst
-%license COPYING COPYING-koji LGPL
-%{python3_sitelib}/pyrpkg
 %if 0%{?with_hatchling}
-%{python3_sitelib}/%{name}-%{version}.dist-info
+%files -n python3-%{name} -f %{pyproject_files}
 %else
+%files -n python3-%{name}
+%{python3_sitelib}/pyrpkg
 %{python3_sitelib}/%{name}-%{version}-py*.egg-info
 %endif
+%doc README.rst CONTRIBUTING.md CHANGELOG.rst
+%license COPYING COPYING-koji LGPL
 %endif
 
 %files common
@@ -276,6 +277,9 @@ example_cli_dir=$RPM_BUILD_ROOT%{_datadir}/%{name}/examples/cli
 
 
 %changelog
+* Tue Jun 24 2025 Ondřej Nosek <onosek@redhat.com> - 1.68-3
+- Switch to %%pyproject_* macros for Fedora releases
+
 * Tue Jun 03 2025 Python Maint <python-maint@redhat.com> - 1.68-2
 - Rebuilt for Python 3.14
 

diff --git a/sources b/sources
index e997688..e3989e2 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-SHA512 (rpkg-1.68.tar.gz) = 13b8812913020ea7aa4a3c3fe25d329755c112703c72fd66ce00fd0b64e2278ca9b032546849b0ab4004df46f234f1391bd8e49684b9eefa1d08f3ed2d89892a
+SHA512 (rpkg-1.68.tar.gz) = cf5d6bb7cdcb95de6a3f858c489e0c059b47a7b5974acb5047dad78d7448a848d5ac0645b73cf9c0ae10b69d7fd663965af4357de2479451810f19583bd5eafd

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

only message in thread, other threads:[~2026-08-10 21:44 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-08-10 21:44 [rpms/rpkg] 1.70-1: Switch to %pyproject_* macros for Fedora releases 

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