-
-
Notifications
You must be signed in to change notification settings - Fork 645
fix(pip): set better defaults for the new target_platforms attr #3447
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -141,9 +141,10 @@ def _pip_parse(self, module_ctx, pip_attr): | |
| module_ctx, | ||
| python_version = full_python_version, | ||
| config = self._config, | ||
| # FIXME @aignas 2025-12-06: should we have this behaviour? | ||
| # TODO @aignas 2025-12-06: use target_platforms always even when the get_index_urls is set. | ||
| target_platforms = [] if default_cross_setup else pip_attr.target_platforms, | ||
| # TODO @aignas 2025-12-09: flip or part to default to 'os_arch' after | ||
| # VERSION_NEXT_FEATURE is released and set the default of the `target_platforms` attribute | ||
| # to `{os}_{arch}`. | ||
| target_platforms = pip_attr.target_platforms or ([] if default_cross_setup else ["{os}_{arch}"]), | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. While the logic is correct, this expression is a bit dense and can be hard to parse at a glance. For improved readability and maintainability, consider extracting this logic into a local variable before the For example: default_target_platforms = [] if default_cross_setup else [\"{os}_{arch}\"]
final_target_platforms = pip_attr.target_platforms or default_target_platformsThen you can pass |
||
| ) | ||
| _add_group_map(self, pip_attr.experimental_requirement_cycles) | ||
| _add_extra_aliases(self, pip_attr.extra_hub_aliases) | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.