Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 717
fix: add flag to use runtime venv creation when using bootstrap=script#2590
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
aignas
merged 19 commits into
bazel-contrib:main
from
rickeylev:fix.venv.symlink.packagingFeb 3, 2025
Uh oh!
There was an error while loading. Please reload this page.
Merged
Changes from all commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
3033d2b
wip: provide way to not use dangling symlinks
rickeylev 6a89238
Merge branch 'main' of https://github.com/bazelbuild/rules_python int…
rickeylev f7ef53f
revert debug changes
rickeylev 41a4131
add basic test
rickeylev 2f2af0e
add packaging test
rickeylev 93848e5
fix bin name
rickeylev e3eadf4
update comment about use_exec triggering
rickeylev 37ea442
buildifier
rickeylev ee640e8
note why relative venv symlinks is used on test
rickeylev c0d20a2
skip on windows
rickeylev df43944
Merge branch 'main' of https://github.com/bazelbuild/rules_python int…
rickeylev d876f13
fix bug after merge
rickeylev 0737858
address review comments
rickeylev 3869174
rename to rules_python_extract_root
rickeylev f0857da
rename to venvs_use_declare_symlink
rickeylev fdbf2a6
fix typo; fix broken test
rickeylev f64ed4b
add versionadded, small doc updates
rickeylev 8ecd60d
fix flag ref in doc
rickeylev 910b087
fix typo in changelog
rickeylev File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Jump to file
Failed to load files.
Loading
Uh oh!
There was an error while loading. Please reload this page.
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,28 +1,56 @@ | ||
| # Environment Variables | ||
| :::{envvar} RULES_PYTHON_REPO_DEBUG | ||
| :::{envvar} RULES_PYTHON_BOOTSTRAP_VERBOSE | ||
| When `1`, repository rules will print debug information about what they're | ||
| When `1`, debug information about bootstrapping of a program is printed to | ||
| stderr. | ||
| ::: | ||
| :::{envvar} RULES_PYTHON_BZLMOD_DEBUG | ||
| When `1`, bzlmod extensions will print debug information about what they're | ||
| doing. This is mostly useful for development to debug errors. | ||
| ::: | ||
| :::{envvar} RULES_PYTHON_REPO_DEBUG_VERBOSITY | ||
| :::{envvar} RULES_PYTHON_DEPRECATION_WARNINGS | ||
| Determines the verbosity of logging output for repo rules. Valid values: | ||
| When `1`, the rules_python will warn users about deprecated functionality that will | ||
| be removed in a subsequent major `rules_python` version. Defaults to `0` if unset. | ||
| ::: | ||
| * `DEBUG` | ||
| * `INFO` | ||
| * `TRACE` | ||
| :::{envvar} RULES_PYTHON_ENABLE_PYSTAR | ||
| When `1`, the rules_python Starlark implementation of the core rules is used | ||
| instead of the Bazel-builtin rules. Note this requires Bazel 7+. | ||
| ::: | ||
| :::{envvar} RULES_PYTHON_REPO_TOOLCHAIN_VERSION_OS_ARCH | ||
| ::::{envvar} RULES_PYTHON_EXTRACT_ROOT | ||
| Determines the python interpreter platform to be used for a particular | ||
| interpreter `(version, os, arch)` triple to be used in repository rules. | ||
| Replace the `VERSION_OS_ARCH` part with actual values when using, e.g. | ||
| `3_13_0_linux_x86_64`. The version values must have `_` instead of `.` and the | ||
| os, arch values are the same as the ones mentioned in the | ||
| `//python:versions.bzl` file. | ||
| Directory to use as the root for creating files necessary for bootstrapping so | ||
| that a binary can run. | ||
| Only applicable when {bzl:flag}`--venvs_use_declare_symlink=no` is used. | ||
| When set, a binary will attempt to find a unique, reusable, location within this | ||
| directory for the files it needs to create to aid startup. The files may not be | ||
| deleted upon program exit; it is the responsibility of the caller to ensure | ||
| cleanup. | ||
| Manually specifying the directory is useful to lower the overhead of | ||
| extracting/creating files on every program execution. By using a location | ||
| outside /tmp, longer lived programs don't have to worry about files in /tmp | ||
| being cleaned up by the OS. | ||
| If not set, then a temporary directory will be created and deleted upon program | ||
| exit. | ||
| :::{versionadded} VERSION_NEXT_PATCH | ||
| ::: | ||
| :::: | ||
| :::{envvar} RULES_PYTHON_GAZELLE_VERBOSE | ||
| When `1`, debug information from gazelle is printed to stderr. | ||
| ::: | ||
| :::{envvar} RULES_PYTHON_PIP_ISOLATED | ||
| @@ -34,37 +62,32 @@ Valid values: | ||
| * Other non-empty values mean to use isolated mode. | ||
| ::: | ||
| :::{envvar} RULES_PYTHON_BZLMOD_DEBUG | ||
| :::{envvar} RULES_PYTHON_REPO_DEBUG | ||
| When `1`, bzlmod extensions will print debug information about what they're | ||
| When `1`, repository rules will print debug information about what they're | ||
| doing. This is mostly useful for development to debug errors. | ||
| ::: | ||
| :::{envvar} RULES_PYTHON_DEPRECATION_WARNINGS | ||
| When `1`, the rules_python will warn users about deprecated functionality that will | ||
| be removed in a subsequent major `rules_python` version. Defaults to `0` if unset. | ||
| ::: | ||
| :::{envvar} RULES_PYTHON_REPO_DEBUG_VERBOSITY | ||
rickeylev marked this conversation as resolved.
Uh oh!There was an error while loading. Please reload this page. | ||
| :::{envvar} RULES_PYTHON_ENABLE_PYSTAR | ||
| Determines the verbosity of logging output for repo rules. Valid values: | ||
| When `1`, the rules_python Starlark implementation of the core rules is used | ||
| instead of the Bazel-builtin rules. Note this requires Bazel 7+. | ||
| * `DEBUG` | ||
| * `INFO` | ||
| * `TRACE` | ||
| ::: | ||
| :::{envvar} RULES_PYTHON_BOOTSTRAP_VERBOSE | ||
| :::{envvar} RULES_PYTHON_REPO_TOOLCHAIN_VERSION_OS_ARCH | ||
| When `1`, debug information about bootstrapping of a program is printed to | ||
| stderr. | ||
| Determines the python interpreter platform to be used for a particular | ||
| interpreter `(version, os, arch)` triple to be used in repository rules. | ||
| Replace the `VERSION_OS_ARCH` part with actual values when using, e.g. | ||
| `3_13_0_linux_x86_64`. The version values must have `_` instead of `.` and the | ||
| os, arch values are the same as the ones mentioned in the | ||
| `//python:versions.bzl` file. | ||
| ::: | ||
| :::{envvar} VERBOSE_COVERAGE | ||
| When `1`, debug information about coverage behavior is printed to stderr. | ||
| ::: | ||
| :::{envvar} RULES_PYTHON_GAZELLE_VERBOSE | ||
| When `1`, debug information from gazelle is printed to stderr. | ||
| ::: | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.