Don't write bytecode when generating pydeps files.

Bug: 767620
Change-Id: I33072a124e7b487aeb97dba2b0c57d1daf3ea980
Reviewed-on: https://chromium-review.googlesource.com/705095
Reviewed-by: Andrew Grieve <[email protected]>
Reviewed-by: Dirk Pranke <[email protected]>
Commit-Queue: John Budorick <[email protected]>
Cr-Commit-Position: refs/heads/master@{#507103}
diff --git a/PRESUBMIT.py b/PRESUBMIT.py
index 70ad7be..f8af75701 100644
--- a/PRESUBMIT.py
+++ b/PRESUBMIT.py
@@ -1984,8 +1984,11 @@
     import difflib
     old_pydeps_data = self._LoadFile(pydeps_path).splitlines()
     cmd = old_pydeps_data[1][1:].strip()
+    env = {
+      'PYTHONDONTWRITEBYTECODE': '1'
+    }
     new_pydeps_data = self._input_api.subprocess.check_output(
-        cmd  + ' --output ""', shell=True)
+        cmd  + ' --output ""', shell=True, env=env)
     old_contents = old_pydeps_data[2:]
     new_contents = new_pydeps_data.splitlines()[2:]
     if old_pydeps_data[2:] != new_pydeps_data.splitlines()[2:]: