From d0dcd320d7e2a631360bd5284e98f3fe7029a238 Mon Sep 17 00:00:00 2001 From: Andrey Vlasovskikh Date: Wed, 27 May 2015 02:55:07 +0300 Subject: [PATCH] Don't generate compiled bytecode files for skeleton generator in the application directory (PY-15907) This fix disabled the generation of compiled bytecode files only for Python >= 2.6 in non read-only directories. Having new files inside the app directory breaks a Mac OS X security policy regarding application signing and it might result in the "incoming network connections" warning (not verified yet). --- python/helpers/generator3.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/python/helpers/generator3.py b/python/helpers/generator3.py index d09f6d918e18..737b29f15a6c 100644 --- a/python/helpers/generator3.py +++ b/python/helpers/generator3.py @@ -1,6 +1,12 @@ # encoding: utf-8 import atexit import zipfile +import sys + + +if hasattr(sys, 'dont_write_bytecode'): + sys.dont_write_bytecode = True + # TODO: Move all CLR-specific functions to clr_tools