ソースを参照

deploy-ng: Ensure sys.frozen is defined in frozen applications

Mitchell Stokes 7 年 前
コミット
dd9a7f31ec
1 ファイル変更4 行追加0 行削除
  1. 4 0
      direct/src/showutil/dist.py

+ 4 - 0
direct/src/showutil/dist.py

@@ -74,6 +74,8 @@ PACKAGE_DATA_DIRS = {
 SITE_PY2 = u"""
 SITE_PY2 = u"""
 import sys
 import sys
 
 
+sys.frozen = True
+
 # Override __import__ to set __file__ for frozen modules.
 # Override __import__ to set __file__ for frozen modules.
 prev_import = __import__
 prev_import = __import__
 def __import__(*args, **kwargs):
 def __import__(*args, **kwargs):
@@ -110,6 +112,8 @@ SITE_PY3 = u"""
 import sys
 import sys
 from _frozen_importlib import _imp, FrozenImporter
 from _frozen_importlib import _imp, FrozenImporter
 
 
+sys.frozen = True
+
 if sys.platform == 'win32':
 if sys.platform == 'win32':
     # Make sure the preferred encoding is something we actually support.
     # Make sure the preferred encoding is something we actually support.
     import _bootlocale
     import _bootlocale