Bug 1454826 - Tup backend: Use PYTHONDONTWRITEBYTECODE=1 instead of -B; r?Build draft
authorMike Shal <mshal@mozilla.com>
Tue, 17 Apr 2018 19:51:56 -0400
changeset 784360 687d36673c3cbce0db67d3e653e258555d15a0a1
parent 784298 4af4ae0aee552a99a995ce4b32198b98294a95f7
push id106905
push userbmo:mshal@mozilla.com
push dateWed, 18 Apr 2018 13:22:16 +0000
reviewersBuild
bugs1454826
milestone61.0a1
Bug 1454826 - Tup backend: Use PYTHONDONTWRITEBYTECODE=1 instead of -B; r?Build MozReview-Commit-ID: GJiqcfe2819
python/mozbuild/mozbuild/backend/tup.py
--- a/python/mozbuild/mozbuild/backend/tup.py
+++ b/python/mozbuild/mozbuild/backend/tup.py
@@ -485,17 +485,17 @@ class TupOnly(CommonBackend, PartialBack
             acdefines_flags += ' -DBUILD_FASTER=1'
 
             fh.write('MOZ_OBJ_ROOT = $(TUP_CWD)\n')
             fh.write('DIST = $(MOZ_OBJ_ROOT)/dist\n')
             fh.write('ACDEFINES = %s\n' % acdefines_flags)
             fh.write('topsrcdir = $(MOZ_OBJ_ROOT)/%s\n' % (
                 os.path.relpath(self.environment.topsrcdir, self.environment.topobjdir)
             ))
-            fh.write('PYTHON = $(MOZ_OBJ_ROOT)/_virtualenv/bin/python -B\n')
+            fh.write('PYTHON = PYTHONDONTWRITEBYTECODE=1 $(MOZ_OBJ_ROOT)/_virtualenv/bin/python\n')
             fh.write('PYTHON_PATH = $(PYTHON) $(topsrcdir)/config/pythonpath.py\n')
             fh.write('PLY_INCLUDE = -I$(topsrcdir)/other-licenses/ply\n')
             fh.write('IDL_PARSER_DIR = $(topsrcdir)/xpcom/idl-parser\n')
             fh.write('IDL_PARSER_CACHE_DIR = $(MOZ_OBJ_ROOT)/xpcom/idl-parser/xpidl\n')
 
         # Run 'tup init' if necessary.
         if not os.path.exists(mozpath.join(self.environment.topsrcdir, ".tup")):
             tup = self.environment.substs.get('TUP', 'tup')