From ce96a462c74fc54ad23bcc5fdf6dfd8f7d53b199 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Fri, 21 Mar 2025 14:49:58 +0100 Subject: [PATCH] Fix reverted conditional in %pyproject_buildrequires -t/-e Fedora version comparison (cherry picked from Fedora commit c1326723a9ecc2abfa8f7b2cc8ddf35b55d94215) --- pyproject-rpm-macros.spec | 5 ++++- pyproject_buildrequires.py | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/pyproject-rpm-macros.spec b/pyproject-rpm-macros.spec index 843e282..560af17 100644 --- a/pyproject-rpm-macros.spec +++ b/pyproject-rpm-macros.spec @@ -14,7 +14,7 @@ License: MIT # Increment Y and reset Z when new macros or features are added # Increment Z when this is a bugfix or a cosmetic change # Dropping support for EOL Fedoras is *not* considered a breaking change -Version: 1.18.0 +Version: 1.18.1 Release: 1%{?dist} # Macro files @@ -191,6 +191,9 @@ export HOSTNAME="rpmbuild" # to speedup tox in network-less mock, see rhbz#1856 %changelog +* Fri Mar 21 2025 Miro Hrončok - 1.18.1-1 +- Fix reverted conditional in %%pyproject_buildrequires -t/-e Fedora version comparison + * Tue Mar 11 2025 Miro Hrončok - 1.18.0-1 - Make %%pyproject_buildrequires -t/-e and %%tox fail when no suitable tox configuration exists - The %%pyproject_buildrequires -t/-e case is temporarily allowed on Fedora 40-42 diff --git a/pyproject_buildrequires.py b/pyproject_buildrequires.py index d90cf1e..4ed7950 100644 --- a/pyproject_buildrequires.py +++ b/pyproject_buildrequires.py @@ -29,7 +29,7 @@ VERSION_RE = re.compile(r'[a-zA-Z0-9.-]+(\.\*)?') # because %tox without config is dangerous (false sense of tests). # Running %pyproject_buildrequires -t/-e without tox config is wrong, but not dangerous. FEDORA = int(os.getenv('FEDORA') or 0) -TOX_ASSERT_CONFIG_OPTS = ('--assert-config',) if 40 <= FEDORA < 43 else () +TOX_ASSERT_CONFIG_OPTS = () if 40 <= FEDORA < 43 else ('--assert-config',) class EndPass(Exception):