chore: always use starlark-based extraction for wheels#3748
chore: always use starlark-based extraction for wheels#3748rickeylev merged 8 commits intobazel-contrib:mainfrom
Conversation
|
Am I missing something? This seems too easy to remove 😅 Ah there we go, CI flagged something... |
There was a problem hiding this comment.
Code Review
This pull request streamlines the wheel extraction logic by removing the _extract_whl_py helper and the enable_pipstar_extract flag, defaulting to whl_extract. A review comment identifies that the reproducible flag in repo_metadata is now applied unconditionally, which could be incorrect if an sdist was built, potentially impacting cache correctness.
|
@aignas re: the gemini comment that its incorrectly marked reproducible even if an sdist is built: I think it's right, but that bug looks to be pre-existing. Right now, pipstar extraction is used for bazel 8+, so it'll always be marked reproducible, even if an sdist was used. I'm going to leave that alone in this PR. |
Currently, the Python `installer` library is used for extracting a wheel when Bazel 7 is used. This library only outputs platform-specific extractions, and it was hard-coded to use a unixy style install. This ends up hiding Windows `pythonw`-based scripts and entry points because those are normalized to simply `python` on unix. To fix, use the Starlark-based extraction logic instead. This is a simpler implementation that extracts the wheels mostly as-is, which allows build-phase logic to handle platform-specific differences. This also makes the Starlark based extraction work for Bazel 8.3 and earlier, which previously didn't support it.
9712d5d to
04f320b
Compare
aignas
left a comment
There was a problem hiding this comment.
LGTM, please also cleanup the python sources that handle extraction and the config repo of unused config flags.
Done! Killed wheel.py and its supporting code. |
Currently, the Python
installerlibrary is used for extracting a wheel when Bazel 7 is used. This library only outputs platform-specific extractions, and it was hard-coded to use a unixy style install. This ends up hiding Windowspythonw-based scripts and entry points because those are normalized to simplypythonon unix.To fix, use the Starlark-based extraction logic instead. This is a simpler implementation that extracts the wheels mostly as-is, which allows build-phase logic to handle platform-specific differences.
This also makes the Starlark based extraction work for Bazel 8.3 and earlier, which previously didn't support it.