Skip to content

Conversation

@aignas
Copy link
Collaborator

@aignas aignas commented Dec 14, 2025

Attempt number 2. This should be smoother this time and should not cause
any breakage because we are not enabling any cross-building by default and
only the host wheels will be present.

Because we also started extracting using starlark APIs, some extra fixups
where needed because some wheels require extracting .data files into
correct paths. This also adds the INSTALLER file after extracting files to
signify that pipstar has installed the file.

Because we have stopped passing hermetic interpreter to the whl_library if
pipstar is enabled, we also needed to ensure that the code path is only enabled
if the extraction with pipstar is supported (i.e. bazel >= 8).

Fixes #2949

@aignas aignas requested a review from rickeylev as a code owner December 14, 2025 23:35
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @aignas, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request flips the default setting for the pipstar feature to be enabled by default. This change aims to simplify the initial setup for users, as the feature will now be active without requiring explicit configuration. The author anticipates a smooth transition, noting that cross-building is not enabled by default, which should prevent any unexpected breakages.

Highlights

  • pipstar Default: The pipstar feature is now enabled by default, streamlining its adoption for users.
  • Configuration: Users can disable pipstar by setting the RULES_PYTHON_ENABLE_PIPSTAR environment variable to 0.
  • Feedback Request: If pipstar needs to be disabled, users are encouraged to comment on issue feat: enable pipstar by default #2949.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request correctly enables the pipstar feature by default, which is a significant step forward. The change itself is simple and direct. The accompanying CHANGELOG.md update is clear and provides users with the necessary information to adapt to this change, including how to opt-out. I have one minor suggestion to improve the formatting in the changelog.

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
@rickeylev
Copy link
Collaborator

CI failure:

(00:28:43) ERROR: /workdir/examples/pip_parse/BUILD.bazel:69:8: in env[WHEEL_DATA_CONTENTS] attribute of py_test rule //:pip_parse_test: label '@@rules_python++pip+pypi//s3cmd:data' in $(locations) expression expands to no files. Since this rule was created by the macro 'py_test', the error might have been caused by the macro implementation
(00:28:43) ERROR: /workdir/examples/pip_parse/BUILD.bazel:69:8: Analysis of target '//:pip_parse_test' (config: 5cac5d0) failed

@rickeylev
Copy link
Collaborator

That failure is a bit strange. It would mean there are literally no files under site-packages?

@aignas
Copy link
Collaborator Author

aignas commented Dec 15, 2025

The build query is weird, it seems like a regression to me.

@aignas
Copy link
Collaborator Author

aignas commented Dec 15, 2025

Somewhat something that I thought might be the case, we can't just extract a wheel, we need to map certain paths in a particular way:

$ env USE_BAZEL_VERSION=8.5.0 bazel query "deps(@pypi//s3cmd:data)"
@@rules_python++pip+pypi_39_s3cmd//:data
@@rules_python++pip+pypi_39_s3cmd//:data/share/doc/packages/s3cmd/INSTALL.md
@@rules_python++pip+pypi_39_s3cmd//:data/share/doc/packages/s3cmd/LICENSE
@@rules_python++pip+pypi_39_s3cmd//:data/share/doc/packages/s3cmd/NEWS
@@rules_python++pip+pypi_39_s3cmd//:data/share/doc/packages/s3cmd/README.md
@@rules_python++pip+pypi_39_s3cmd//:data/share/man/man1/s3cmd.1

This is what the data contains in the non pipstar case.

@aignas aignas requested a review from groodt as a code owner December 15, 2025 13:44
@aignas
Copy link
Collaborator Author

aignas commented Dec 15, 2025

found it, had it forgotten.

@aignas
Copy link
Collaborator Author

aignas commented Dec 15, 2025

@rickeylev, do you wanna do the path remapping at the build time instead of the repo phase? I think that for compatibility reasons we should keep this for now and then we can think about it later on how we can actually extract/link the wheels better.

@aignas aignas changed the title feat: flip pipstar to be on by default fix(pipstar): fix whl extraction and flip pipstar=true Dec 16, 2025
@aignas
Copy link
Collaborator Author

aignas commented Dec 16, 2025

OK, bugs should have been fixed PTAL.

@aignas aignas requested a review from rickeylev December 16, 2025 16:12
@rickeylev
Copy link
Collaborator

yes, lets keep it the same for now, for compatibility.

@rickeylev rickeylev added this pull request to the merge queue Dec 17, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Dec 17, 2025
@rickeylev rickeylev added this pull request to the merge queue Dec 17, 2025
Merged via the queue into bazel-contrib:main with commit fc2a9f9 Dec 17, 2025
4 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.

feat: enable pipstar by default

2 participants