Skip to content

Commit

Permalink
Fix python3 stdlib-zip hash seed hermeticity
Browse files Browse the repository at this point in the history
Summary:
Define a set `PYTHONHASHSEED` to fix compilation of the python standard
library, which currently produces different python byte-code on each
compilation.

Closes: #46
GitOrigin-RevId: 443c2a10af93de24e3fc6115680bc3a71c23705c
  • Loading branch information
corypaik authored and jhance committed Mar 23, 2022
1 parent c970554 commit b567504
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions thirdparty/cpython/BUILD.python38
Original file line number Diff line number Diff line change
Expand Up @@ -1123,6 +1123,7 @@ genrule(
outs = ["lib/python38.zip"],
cmd = """
export ASAN_OPTIONS=detect_leaks=0
export PYTHONHASHSEED=0
mkdir $(@D)/python3.8
touch $(@D)/python3.8/os.py
mkdir $(@D)/python3.8/lib-dynload
Expand Down
1 change: 1 addition & 0 deletions thirdparty/cpython/BUILD.python39
Original file line number Diff line number Diff line change
Expand Up @@ -1163,6 +1163,7 @@ genrule(
outs = ["lib/python39.zip"],
cmd = """
export ASAN_OPTIONS=detect_leaks=0
export PYTHONHASHSEED=0
mkdir $(@D)/python3.9
touch $(@D)/python3.9/os.py
mkdir $(@D)/python3.9/lib-dynload
Expand Down

0 comments on commit b567504

Please sign in to comment.