Bug 2171343 - %pyproject_buildrequires: Self-referential extra requirements are broken
Summary: %pyproject_buildrequires: Self-referential extra requirements are broken
Keywords:
Status: CLOSED ERRATA
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: 2187066
TreeView+ depends on / blocked
 
Reported: 2023-02-20 03:22 UTC by Elliott Sales de Andrade
Modified: 2023-05-19 01:24 UTC (History)
5 users (show)

Fixed In Version: pyproject-rpm-macros-1.8.0-1.fc39 pyproject-rpm-macros-1.8.0-1.fc38 pyproject-rpm-macros-1.8.0-1.fc37
Clone Of:
Environment:
Last Closed: 2023-05-16 17:06:15 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Elliott Sales de Andrade 2023-02-20 03:22:32 UTC
Description of problem:
The latest version of Fiona uses an optional dependency line of: `all = ["Fiona[calc,s3,test]"]` [1] and also has "Fiona[s3]" in its test extra [2]. 

When using `pyproject_buildrequires`; this attempts to install python3dist(fiona[s3]) during a build, which doesn't exist.

In order to get a build working, I've had to patch the `pyproject.toml` to expand the optional dependencies [3].

Version-Release number of selected component (if applicable):
1.6.2-1.fc39


Steps to Reproduce:
1. fedpkg clone python-fiona
2. Delete the second patch
3. fedpkg mockbuild


Actual results:
DEBUG util.py:443:  No matching package to install: 'python3dist(fiona[s3])'


Expected results:
Dependencies are installed

Additional info:
[1] https://github.com/Toblerity/Fiona/blob/1.9.1/pyproject.toml#L47
[2] https://github.com/Toblerity/Fiona/blob/1.9.1/pyproject.toml#L51
[3] https://src.fedoraproject.org/rpms/python-fiona/blob/rawhide/f/0002-Remove-self-referencing-dependencies.patch

Comment 1 Miro Hrončok 2023-02-20 07:09:06 UTC
This is the first time I've seen anything like this.

Seems like pip supports it now: https://github.com/pypa/setuptools/issues/1260#issuecomment-1044771738

Comment 2 Lumír Balhar 2023-04-17 09:28:41 UTC
The latest version of attrs has something similar: https://github.com/python-attrs/attrs/blob/a9e9579e4e2c3491026e2cb64ba5e0b1c5a0a89e/pyproject.toml#L45

Comment 4 Fedora Update System 2023-05-16 17:03:03 UTC
FEDORA-2023-0023e4e06c has been submitted as an update to Fedora 39. https://bodhi.fedoraproject.org/updates/FEDORA-2023-0023e4e06c

Comment 5 Fedora Update System 2023-05-16 17:06:15 UTC
FEDORA-2023-0023e4e06c has been pushed to the Fedora 39 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 6 Fedora Update System 2023-05-16 17:14:59 UTC
FEDORA-2023-63635ff1df has been submitted as an update to Fedora 37. https://bodhi.fedoraproject.org/updates/FEDORA-2023-63635ff1df

Comment 7 Fedora Update System 2023-05-16 17:15:01 UTC
FEDORA-2023-43dcf540b0 has been submitted as an update to Fedora 38. https://bodhi.fedoraproject.org/updates/FEDORA-2023-43dcf540b0

Comment 8 Fedora Update System 2023-05-17 01:22:36 UTC
FEDORA-2023-43dcf540b0 has been pushed to the Fedora 38 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2023-43dcf540b0`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2023-43dcf540b0

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 9 Fedora Update System 2023-05-17 02:04:12 UTC
FEDORA-2023-63635ff1df has been pushed to the Fedora 37 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2023-63635ff1df`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2023-63635ff1df

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 10 Fedora Update System 2023-05-19 01:16:23 UTC
FEDORA-2023-43dcf540b0 has been pushed to the Fedora 38 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 11 Fedora Update System 2023-05-19 01:24:20 UTC
FEDORA-2023-63635ff1df has been pushed to the Fedora 37 stable repository.
If problem still persists, please make note of it in this bug report.


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