Skip to content

feat(toolchain): Add new make vars for Python interpreter path compliant with --no_legacy_external_runfiles #2772

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 2 commits into from
Apr 15, 2025

Conversation

FrankPortman
Copy link
Contributor

@FrankPortman FrankPortman commented Apr 13, 2025

Using these new make vars in py_binary or py_test will correctly find the interpreter when setting --no_legacy_external_runfiles.

Fixes #2728

Copy link
Collaborator

@aignas aignas left a comment

Choose a reason for hiding this comment

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

The change LGTM. I think the py2_runtime at some point should be dropped entirely.

Things that need to be done before this is merged:

  • Document the PYTHON3_ROOTPATH make var somewhere, this file seems to be a good place to do that.
  • Add :::versionchanged::: VERSION_NEXT_FEATURE line in the docstring for the rule, similar to how it is done elsewhere.
  • Add a line in the CHANGELOG about the added feature.
  • A test to ensure that this works is optional since we don't have any tests using the PYTHON3 var yet.

I might add these things if/when I have time myself, but if you want things to move quicker, please add these things.

@FrankPortman FrankPortman requested a review from aignas April 14, 2025 19:11
Copy link
Collaborator

@aignas aignas left a comment

Choose a reason for hiding this comment

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

This is perfect, thank you!

@aignas aignas added this pull request to the merge queue Apr 15, 2025
Merged via the queue into bazel-contrib:main with commit a0400e9 Apr 15, 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.

make variables for runfiles location of $(PYTHON3) to support --no_legacy_external_runfiles
2 participants