1. Vadim Fint
  2. btb

Commits

Vadim Fint  committed d9712cc

feature: use sys.dont_write_bytecode

  • Participants
  • Parent commits 651c6a1
  • Branches feature

Comments (0)

Files changed (1)

File do

View file
 import sys
 
 # Ensure this script and its deps will not force python to write bytecode files
-if 'PYTHONDONTWRITEBYTECODE' not in os.environ:
-    os.environ['PYTHONDONTWRITEBYTECODE'] = '1'
-    os.execvp(sys.executable, [sys.executable] + sys.argv)
+sys.dont_write_bytecode = True
 
 sys.path[0] = os.path.abspath('tools')
 
-
 from fabricate import run, main
 import os
 import shutil