Bug 2192581 - RFE: Allow passing config settings to build backends
Summary: RFE: Allow passing config settings to build backends
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: pyproject-rpm-macros
Version: rawhide
Hardware: Unspecified
OS: Linux
unspecified
low
Target Milestone: ---
Assignee: Miro Hrončok
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-05-02 11:10 UTC by Miro Hrončok
Modified: 2023-06-18 01:13 UTC (History)
5 users (show)

Fixed In Version: pyproject-rpm-macros-1.9.0-1.fc39 pyproject-rpm-macros-1.9.0-1.fc38 pyproject-rpm-macros-1.9.0-1.fc37
Clone Of:
Environment:
Last Closed: 2023-06-02 08:31:28 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Miro Hrončok 2023-05-02 11:10:35 UTC
For example, the meson-python build backend supports different config settings as described at https://meson-python.readthedocs.io/en/latest/how-to-guides/config-settings.html#how-to-guides-config-settings

This is useable with build and pip, but not via our macros. It would be nice to support this, so packagers can avoid patching like https://src.fedoraproject.org/rpms/python-scikit-misc/c/3dda47b4b7

Comment 1 Miro Hrončok 2023-05-03 10:50:38 UTC
My raw notes:

pypa/build uses -C
pip uses --config-settings
RPM macros can only take "short" options so we can only mimic the pypa/build API and use -C.



%pyproject_wheel can gain a -C option (with arguments) and pass it to pyproject_wheel.py via %{?**} (as %{?-C} only contains the last -C used and we need to support repeated usage).

pyproject_wheel.py does not currently use argparse but it could be extended to use it. It would then pass all -C options to build_wheel(...), which would pass them as --config-settings to `pip wheel`.


%pyproject_buildrequires would need to gain a -C option as well, for usage with -w. When -C... is used without -w, it should either fail or imply -w.

pyproject_buildrequires.py already takes %{?**}, so the script's argparser could be trivially extended to accept multiple -C arguments and pass them to pyproject_wheel.build_wheel(...).



Overall, I assume this should be quite doable.

Comment 3 Fedora Update System 2023-06-02 08:29:23 UTC
FEDORA-2023-057dff3425 has been submitted as an update to Fedora 39. https://bodhi.fedoraproject.org/updates/FEDORA-2023-057dff3425

Comment 4 Fedora Update System 2023-06-02 08:31:28 UTC
FEDORA-2023-057dff3425 has been pushed to the Fedora 39 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 5 Fedora Update System 2023-06-02 08:50:42 UTC
FEDORA-2023-2be13415cb has been submitted as an update to Fedora 38. https://bodhi.fedoraproject.org/updates/FEDORA-2023-2be13415cb

Comment 6 Fedora Update System 2023-06-02 08:50:42 UTC
FEDORA-2023-5a7658328a has been submitted as an update to Fedora 37. https://bodhi.fedoraproject.org/updates/FEDORA-2023-5a7658328a

Comment 7 Fedora Update System 2023-06-03 02:24:40 UTC
FEDORA-2023-2be13415cb 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-2be13415cb`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2023-2be13415cb

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

Comment 8 Fedora Update System 2023-06-03 03:18:51 UTC
FEDORA-2023-5a7658328a 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-5a7658328a`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2023-5a7658328a

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

Comment 9 Fedora Update System 2023-06-08 02:02:53 UTC
FEDORA-2023-2be13415cb has been pushed to the Fedora 38 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 10 Fedora Update System 2023-06-18 01:13:56 UTC
FEDORA-2023-5a7658328a 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.