Repository navigation
feat(pypi): add the extras from the pyproject.toml to the hubs with pip.configure - #48
Draft
aignas wants to merge 1 commit into
Conversation
…ip.configure The extras that the user depends on directly are often not in the lock file, e.g. when it is compiled with the extras stripped. pip.configure now adds the extras requested in the selected pyproject.toml dependency groups, e.g. requests[socks], to the hub, so that the [socks] target exists and the package target includes the extra. The environment markers of the requirements are evaluated for each target platform, so an extra is only added for the platforms that request it. Work towards bazel-contrib#2786
This was referenced Nov 22, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The extras that the user depends on directly are often not in the lock
file, e.g. when the requirements are compiled with the extras stripped.
pip.configurenow adds the extras requested in the selectedpyproject.tomldependency groups to the hub, so@pypi//requests:[socks]exists and@pypi//requestsincludes theextra. The markers of the requirements are evaluated for each target
platform, so an extra is only added for the platforms that request it,
splitting the config settings where needed.
Part of #41. Based on the previous PR of the stack.
Work towards bazel-contrib#2786