Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UI for providing config_settings to PEP 517 hooks #10787

Closed
1 task done
pfmoore opened this issue Jan 12, 2022 · 3 comments
Closed
1 task done

UI for providing config_settings to PEP 517 hooks #10787

pfmoore opened this issue Jan 12, 2022 · 3 comments
Labels
resolution: duplicate Duplicate of an existing issue/PR

Comments

@pfmoore
Copy link
Member

pfmoore commented Jan 12, 2022

What's the problem this feature will solve?

PEP 517 provides the option for build frontends to pass a config_settings argument to build hooks. This is intended to be a dictionary of backend-specific options and their values. Currently, few if any backends support config settings, so pip has not needed to support this argument.

If and when backends start to offer configuration options via config_settings, users will want to be able to supply them from pip.

Describe the solution you'd like

I don't have a good intuition for what the UI for config settings would look like. I could imagine that we might need any or all of the following:

  1. Per project settings (set option1=12, option2=true for project FOO).
  2. Per backend settings (set xxx=something for all calls to flit).
  3. Per hook settings (set xxx=something for build_wheel calls).

Or any combination of these. Without knowing what sorts of things backends might want to do it's hard to know what possibilities are reasonable to support. But if we make things too general, the UI will be over complex.

Alternative Solutions

I'm thinking of prototyping a backend which uses config options. If I do so, I will probably start by having a single pip option that points to a file containing some form of specification of options - quite likely in TOML format. That would offer a "quick and dirty" solution.

It's possible that would even be sufficient for general use, although having to write and reference a separate file might be annoying for users.

Additional context

This is the PEP 517 equivalent of the legacy --install-option argument. Maybe some insights could be taken from how that worked (although IMO the interface for that option was pretty clumsy).

The PEP 517 section on config settings.

One practical use for config settings may be build backends that want to allow the user to choose from multiple strategies for implementing editable installs.

Note that there is no urgency for this feature - until there are backends that use config settings it adds no value. However, I think it's useful to have this as a master issue to collect design discussions and use cases.

Code of Conduct

@pfmoore pfmoore added type: feature request Request for a new feature S: needs triage Issues/PRs that need to be triaged labels Jan 12, 2022
@pradyunsg
Copy link
Member

Paul, yes, but don't repeat yourself! 😛

Duplicate of #5771

@pfmoore
Copy link
Member Author

pfmoore commented Jan 13, 2022

Sigh, my memory's going. As apparently is my search skills - I really did search for related issues before adding this! Thanks for the catch.

@DiddiLeija DiddiLeija added resolution: duplicate Duplicate of an existing issue/PR and removed type: feature request Request for a new feature S: needs triage Issues/PRs that need to be triaged labels Jan 13, 2022
@pradyunsg
Copy link
Member

Well, if it eases you -- it took me, like, 20 minutes to find that. :)

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 4, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
resolution: duplicate Duplicate of an existing issue/PR
Projects
None yet
Development

No branches or pull requests

3 participants