Skip to content

Commit 4760cf6

Browse files
authored
Update python/private/pypi/pypi_repo_utils.bzl
1 parent 08513f8 commit 4760cf6

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

python/private/pypi/pypi_repo_utils.bzl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,8 @@ def _execute_prep(mrctx, *, python, srcs, **kwargs):
116116
if pythonpath and not types.is_string(pythonpath):
117117
environment["PYTHONPATH"] = _construct_pypath(mrctx, entries = pythonpath)
118118
kwargs["environment"] = environment
119+
# -B is added to prevent the repo-phase invocation from creating timestamp
120+
# based pyc files, which contributes to race conditions and non-determinism
119121
kwargs["arguments"] = [python, "-B"] + kwargs.get("arguments", [])
120122
return kwargs
121123

0 commit comments

Comments
 (0)