Skip to content

fix(pypi): output only necessary target_platforms #2710

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

Merged
merged 1 commit into from
Mar 29, 2025

Conversation

aignas
Copy link
Collaborator

@aignas aignas commented Mar 29, 2025

This change reduces the number of lines we are going to write to the
MODULE.bazel.lock file by not writing experimental_target_platforms
to the lock file that eventually get discarded in the whl_library if
the wheel is platform specific 1.

This means that the tests will become more easy to understand, but
technically this is a no-op change, only resulting in a smaller lock
file:

$ wc -l MODULE.bazel.lock
6536 MODULE.bazel.lock

$ bazel mod deps --lockfile_mode=refresh
...

$ wc -l MODULE.bazel.lock
6154 MODULE.bazel.lock

Work related to #2622

@aignas aignas changed the title fix(pypi): fix parsing of env markers with universal requirements files fix(pypi): output only necessary target_platforms Mar 29, 2025
This change reduces the number of lines we are going to write to the
MODULE.bazel.lock file by not writing `experimental_target_platforms`
to the lock file that eventually get discarded in the `whl_library` if
the wheel is platform specific [1].

This means that the tests will become more easy to understand, but
technically this is a no-op change, only resulting in a smaller lock
file:
```
$ wc -l MODULE.bazel.lock
6536 MODULE.bazel.lock

$ bazel mod deps --lockfile_mode=refresh
...

$ wc -l MODULE.bazel.lock
6154 MODULE.bazel.lock
```

Work related to bazel-contrib#2622

[1]: https://github.com/bazel-contrib/rules_python/blob/09145b9f628d482246eaa70421bf0cbae9acb096/python/private/pypi/whl_library.bzl#L337
@aignas aignas marked this pull request as ready for review March 29, 2025 07:56
@aignas aignas requested review from rickeylev and groodt as code owners March 29, 2025 07:56
@aignas aignas added this pull request to the merge queue Mar 29, 2025
Merged via the queue into bazel-contrib:main with commit 67e233f Mar 29, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants