-
-
Notifications
You must be signed in to change notification settings - Fork 668
chore: disable build_python_zip in bazelrcs #3576
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
Open
rickeylev
wants to merge
43
commits into
bazel-contrib:main
Choose a base branch
from
rickeylev:pyzipapp.disable.implicit.zip.output
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+283
−29
Open
Changes from all commits
Commits
Show all changes
43 commits
Select commit
Hold shift + click to select a range
b15a070
disable build_python_zip
rickeylev 31b5a3d
add some error reporting
rickeylev 22cf202
tag the tool_build_data genrule as manual so that it runs as part of …
rickeylev 84a7f8f
Merge branch 'main' of https://github.com/bazel-contrib/rules_python …
rickeylev 4d10302
try IO way of writing file from gemini
rickeylev 7673610
ignore cleanup error on windows
rickeylev 9c64f99
Merge branch 'main' of https://github.com/bazel-contrib/rules_python …
rickeylev 050bbe9
debugging of why file is missing
rickeylev 44ae114
remove extra sys import
rickeylev f1b373c
debug logic
rickeylev 5108ea7
fix syntax
rickeylev fe7c47a
recurse symlnks
rickeylev 74992d7
remove recurse symlinks arg
rickeylev c2e4927
enable bootstrap debug for pyconsole gen
rickeylev a63ee89
add more debugging
rickeylev fd4434b
print manifest lines
rickeylev 7cbb490
fix var name
rickeylev 295f840
force build_runfile_links to true
rickeylev c4642fc
Merge branch 'main' of https://github.com/bazel-contrib/rules_python …
rickeylev f8d37d0
grant everyone read, see if it works around permission error
rickeylev e37f7bd
try to fix label resolution
rickeylev 9b1a481
Set internal attribute for py_test too
rickeylev 64abc06
clean up build_runfile_links transition
rickeylev f81b664
add missing command_line_option directory
rickeylev 7e49984
fix reconfig transition logic
rickeylev 72671c9
try enable_runfiles=true, add sys py test
rickeylev e081548
try tomake work with enable_runfiles=false
rickeylev 2164baf
fix func name
rickeylev 04ef9af
add open r arg, add missing distribution target
rickeylev e6a57fd
add debug logic
rickeylev bb9dcdf
add utf8-sig logic, more debug
rickeylev 6d41092
fix stage2 bootstrap path rendering
rickeylev 0eda191
try to normpath, i guess?
rickeylev 060991c
strip to remove trailing newline
rickeylev daa8769
encode to ut8
rickeylev ebc6ed8
use decode, not encode, on bytes object
rickeylev dc97151
manifest lookup of interpreter
rickeylev 254c712
less debugging
rickeylev c66503b
add some debugging
rickeylev fa3d3fb
fix syntax
rickeylev bc954c2
return the found value, duh
rickeylev a721a9e
add notes
rickeylev 1f72425
transition enable_runfiles
rickeylev File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| # Aliases for Bazel builtin //command_line_option psuedo-targets | ||
| # | ||
| # These are alias to use with `py_binary.config_settings` that are treated | ||
| # as aliases for `//command_line_option:XXX` psuedo-targets. | ||
|
|
||
| package( | ||
| default_visibility = ["//visibility:public"], | ||
| ) | ||
|
|
||
| # todo: add docs, xref with config_settings | ||
| # rules_python target, config_setting processing code converts it to the | ||
| # Bazel-builtin //command_line_label:build_runfile_links psuedo-target | ||
| alias( | ||
| name = "build_runfile_links", | ||
| actual = "//python:none", | ||
| ) | ||
|
|
||
| # todo: add docs | ||
| alias( | ||
| name = "enable_runfiles", | ||
| actual = "//python:none", | ||
| ) | ||
|
|
||
| filegroup( | ||
| name = "distribution", | ||
| srcs = glob(["**"]), | ||
| visibility = ["//:__subpackages__"], | ||
| ) |
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,3 +1,10 @@ | ||
| # https://docs.bazel.build/versions/main/best-practices.html#using-the-bazelrc-file | ||
| try-import %workspace%/user.bazelrc | ||
| common --incompatible_python_disallow_native_rules | ||
|
|
||
| # See issue 3567. Disable implicit python zip creation. | ||
rickeylev marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| common --build_python_zip=false | ||
| common --@rules_python//python/config_settings:build_python_zip=false | ||
|
|
||
| # Windows makes use of runfiles for some rules | ||
| ##common --enable_runfiles | ||
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
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,17 +1,29 @@ | ||
| $OutputPath = $env:OUTPUT | ||
|
|
||
| Add-Content -Path $OutputPath -Value "TARGET $env:TARGET" | ||
| Add-Content -Path $OutputPath -Value "CONFIG_MODE $env:CONFIG_MODE" | ||
| Add-Content -Path $OutputPath -Value "STAMPED $env:STAMPED" | ||
| $Lines = @( | ||
| "TARGET $env:TARGET", | ||
| "CONFIG_MODE $env:CONFIG_MODE", | ||
| "STAMPED $env:STAMPED" | ||
| ) | ||
|
|
||
| $VersionFilePath = $env:VERSION_FILE | ||
| if (-not [string]::IsNullOrEmpty($VersionFilePath)) { | ||
| Get-Content -Path $VersionFilePath | Add-Content -Path $OutputPath | ||
| if (-not [string]::IsNullOrEmpty($VersionFilePath) -and (Test-Path $VersionFilePath)) { | ||
| $Lines += Get-Content -Path $VersionFilePath | ||
| } | ||
|
|
||
| $InfoFilePath = $env:INFO_FILE | ||
| if (-not [string]::IsNullOrEmpty($InfoFilePath)) { | ||
| Get-Content -Path $InfoFilePath | Add-Content -Path $OutputPath | ||
| if (-not [string]::IsNullOrEmpty($InfoFilePath) -and (Test-Path $InfoFilePath)) { | ||
| $Lines += Get-Content -Path $InfoFilePath | ||
| } | ||
|
|
||
| # Use .NET to write file to avoid PowerShell encoding/locking quirks | ||
| # We use UTF8 without BOM for compatibility with how the bash script writes (and | ||
| # what consumers expect). | ||
| $Utf8NoBom = New-Object System.Text.UTF8Encoding $False | ||
| [System.IO.File]::WriteAllLines($OutputPath, $Lines, $Utf8NoBom) | ||
|
|
||
| $Acl = Get-Acl $OutputPath | ||
| $AccessRule = New-Object System.Security.AccessControl.FileSystemAccessRule("Everyone", "Read", "Allow") | ||
| $Acl.SetAccessRule($AccessRule) | ||
| Set-Acl $OutputPath $Acl | ||
|
|
||
| exit 0 |
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
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.
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.