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 713
fix: don't require system Python to perform bootstrapping#1929
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
Uh oh!
There was an error while loading. Please reload this page.
Changes from all commits
File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,7 @@ | ||
| load("@bazel_skylib//rules:common_settings.bzl", "string_flag") | ||
| load( | ||
| "//python/private:flags.bzl", | ||
| "BootstrapImplFlag", | ||
| "PrecompileAddToRunfilesFlag", | ||
| "PrecompileFlag", | ||
| "PrecompileSourceRetentionFlag", | ||
| @@ -52,3 +53,11 @@ string_flag( | ||
| # NOTE: Only public because its an implicit dependency | ||
| visibility = ["//visibility:public"], | ||
| ) | ||
| string_flag( | ||
| name = "bootstrap_impl", | ||
rickeylev marked this conversation as resolved.
Uh oh!There was an error while loading. Please reload this page. | ||
| build_setting_default = BootstrapImplFlag.SYSTEM_PYTHON, | ||
| values = sorted(BootstrapImplFlag.__members__.values()), | ||
| # NOTE: Only public because its an implicit dependency | ||
| visibility = ["//visibility:public"], | ||
| ) | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -376,9 +376,54 @@ exports_files( | ||
| visibility = ["//visibility:public"], | ||
| ) | ||
| filegroup( | ||
| name = "stage1_bootstrap_template", | ||
| srcs = ["stage1_bootstrap_template.sh"], | ||
| # Not actually public. Only public because it's an implicit dependency of | ||
| # py_runtime. | ||
| visibility = ["//visibility:public"], | ||
| ) | ||
| filegroup( | ||
| name = "stage2_bootstrap_template", | ||
| srcs = ["stage2_bootstrap_template.py"], | ||
| # Not actually public. Only public because it's an implicit dependency of | ||
| # py_runtime. | ||
| visibility = ["//visibility:public"], | ||
| ) | ||
| filegroup( | ||
| name = "zip_main_template", | ||
| srcs = ["zip_main_template.py"], | ||
| # Not actually public. Only public because it's an implicit dependency of | ||
| # py_runtime. | ||
| visibility = ["//visibility:public"], | ||
| ) | ||
| # NOTE: Windows builds don't use this bootstrap. Instead, a native Windows | ||
| # program locates some Python exe and runs `python.exe foo.zip` which | ||
| # runs the __main__.py in the zip file. | ||
| alias( | ||
| name = "bootstrap_template", | ||
| actual = select({ | ||
| ":is_script_bootstrap_enabled": "stage1_bootstrap_template.sh", | ||
| "//conditions:default": "python_bootstrap_template.txt", | ||
rickeylev marked this conversation as resolved.
Uh oh!There was an error while loading. Please reload this page. | ||
| }), | ||
| # Not actually public. Only public because it's an implicit dependency of | ||
| # py_runtime. | ||
| visibility = ["//visibility:public"], | ||
| ) | ||
| # Used to determine the use of `--stamp` in Starlark rules | ||
| stamp_build_setting(name = "stamp") | ||
| config_setting( | ||
| name = "is_script_bootstrap_enabled", | ||
| flag_values = { | ||
| "//python/config_settings:bootstrap_impl": "script", | ||
| }, | ||
| ) | ||
| print_toolchains_checksums(name = "print_toolchains_checksums") | ||
| # Used for py_console_script_gen rule | ||
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.