-
-
Notifications
You must be signed in to change notification settings - Fork 639
Open
Open
Copy link
Labels
Description
Currently the API for defining different parameters by target platform is not ideal and we need to jump over hoops whilst trying to maintain it. The main difficulties are:
- We would like to specify different
pip.parseattributes per target platform, but we cannot, because some of the parameters need to be labels, label lists or other. - We cannot have overrides for these things easily and the definitions of what those target platforms are are hard-coded in the code.
The idea that I have is to reuse the same recipe from #2578, where we create a builder for the configuration and it allows us easily define:
- default constraint and flag values for the config settings that we create for different platform variants.
- default values for the pip index url, etc
- default values for which platforms we should support.
- default
authconfiguration for thebazel_downloader. - The list of
python_versionsthat are supportedpip.parse(python_version=)should not be mandatory #1708. - build the configuration incrementally for the
pip.parseinvocation allowing per-target-platform configuration of:extra_pip_args. feat: add support for passing extra pip args by platform #2745requirements_lock.constraint_valuesandflag_values. pip_parse: requirements_by_platform: allow custom defined platforms #2548
What is more the override API could be blended in more easily to provide better support for specifying different, patches, etc.
TODO:
- Design
defaultsandconfigureAPIs and use that to set the defaults withinrules_pythonfor selecting the whls. - Do the same for
index_urlsetting, at some pointrules_pythoncould set the defaultindex_urlto default to the new code path. - Transition the current
pip.parseto usepip.configureunder the hood. - Ensure people can ignore specific
whl_platform_tagsfor a particular platform (and maybe even a particular whl).
chrisirhc and hartikainen