siso: set PYTHONDONTWRITEBYTECODE=1 if not set

during build, lots of python scripts run and generates
lots of pycache *.pyc in workspace.
To keep workspace clean, set PYTHONDONTWRITEBYTECODE=1
in siso.py

Change-Id: I725c6745c44410eef4a780b8ffc30fdafd899334
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5606824
Reviewed-by: Philipp Wollermann <philwo@google.com>
Reviewed-by: Erik Staab <estaab@chromium.org>
Commit-Queue: Fumitoshi Ukai <ukai@google.com>
Auto-Submit: Fumitoshi Ukai <ukai@google.com>
changes/24/5606824/2
Fumitoshi Ukai 11 months ago committed by LUCI CQ
parent 089b4f38ae
commit 951578030e

@ -63,6 +63,12 @@ def main(args):
os.environ.pop("LIBRARY_PATH", None)
os.environ.pop("SDKROOT", None)
# if user doesn't set PYTHONPYCACHEPREFIX and PYTHONDONTWRITEBYTECODE
# set PYTHONDONTWRITEBYTECODE=1 not to create many *.pyc in workspace
# and keep workspace clean.
if not os.environ.get("PYTHONPYCACHEPREFIX"):
os.environ.setdefault("PYTHONDONTWRITEBYTECODE", "1")
environ = os.environ.copy()
# Get gclient root + src.

Loading…
Cancel
Save