diff --git a/pyproject-rpm-macros.spec b/pyproject-rpm-macros.spec index 0000184..765a6ad 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.22.1 +Version: 1.22.2 Release: 1%{?dist} # Macro files @@ -179,6 +179,9 @@ export HOSTNAME="rpmbuild" # to speedup tox in network-less mock, see rhbz#1856 %changelog +* Thu May 14 2026 Miro Hrončok - 1.22.2-1 +- %%pyproject_buildrequires: Fix "Requirement satisfied/not satisfied" messages to show overridden constraints from %%pyproject_patch_dependency + * Thu May 07 2026 Miro Hrončok - 1.22.1-1 - Fix a regression wrt option parsing for macros with backslash-escaped newlines in argument list diff --git a/pyproject_buildrequires.py b/pyproject_buildrequires.py index 769c059..3c2d760 100644 --- a/pyproject_buildrequires.py +++ b/pyproject_buildrequires.py @@ -237,6 +237,7 @@ class Requirements: # Apply dependency overrides before the installed-version check, # so the check reflects the constraints we will actually output. requirement = self._apply_dependency_overrides(requirement) + requirement_str = str(requirement) # We need to always accept pre-releases as satisfying the requirement # Otherwise e.g. installed cffi version 1.15.0rc2 won't even satisfy the requirement for "cffi" diff --git a/pyproject_buildrequires_testcases.yaml b/pyproject_buildrequires_testcases.yaml index c4c5fd1..d963c0d 100644 --- a/pyproject_buildrequires_testcases.yaml +++ b/pyproject_buildrequires_testcases.yaml @@ -1925,6 +1925,36 @@ Dependency override drop_lower: python3dist(foo) result: 0 +Dependency override drop_lower (stderr contains overriden constraint): + installed: + setuptools: 50 + wheel: 1 + tomli: 1 + bar: 1.5 + include_runtime: false + dependency_overrides: + - "bar:drop_lower" + pyproject.toml: | + [build-system] + requires = ["setuptools", "wheel", "bar>=1.0,<2.0"] + build-backend = "setuptools.build_meta" + setup.cfg: | + [metadata] + name = test + version = 0.1 + expected: + - | # setuptools 70+ + python3dist(bar) < 2~~ + python3dist(setuptools) + python3dist(wheel) + - | # setuptools < 70 + python3dist(bar) < 2~~ + python3dist(setuptools) + python3dist(wheel) + python3dist(wheel) + result: 0 + stderr_contains: "Requirement satisfied: bar<2.0" + Dependency override drop_constraints: installed: setuptools: 50