Bug 1977060 - %pyproject_buildrequires converts "~= 0.4.0" to ">= 0.4 with < 1" instead of ">= 0.4 with < 0.5"
Summary: %pyproject_buildrequires converts "~= 0.4.0" to ">= 0.4 with < 1" instead of ...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: pyproject-rpm-macros
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Miro Hrončok
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-06-28 20:51 UTC by Miro Hrončok
Modified: 2021-07-09 11:57 UTC (History)
3 users (show)

Fixed In Version: pyproject-rpm-macros-0-42
Clone Of:
Environment:
Last Closed: 2021-07-09 11:57:42 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Miro Hrončok 2021-06-28 20:51:39 UTC
When the upstream project requires:

    gast ~= 0.4.0

The runtime dependency generator converts it to:

    (python3.Xdist(gast) >= 0.4 with python3.Xdist(gast) < 0.5)

But the %pyproject_buildrequires (pyproject-rpm-macros <= 0-41) converts it to:

    (python3dist(gast) >= 0.4 with python3dist(gast) < 1)

The first seem to be behave like upstream.

This may lead to incomplete run of %pyproject_buildrequires when gast 0.5 (or 0.6, 0.7...) is installed because requirements.check() will end the script (Python dependencies unsatisfied) but there will no more packages to install (RPM dependencies satisfied).

This seem to be used by stripping the leading zeros (via canonicalize_version()) before sending the requirement to convert() and hence actually processing ~= 0.4 instead of ~= 0.4.0 which has a different meaning.


Note You need to log in before you can comment on or make changes to this bug.