summaryrefslogtreecommitdiffstats
path: root/Tools/freeze/freeze.py
diff options
context:
space:
mode:
authorMartin v. Löwis <martin@v.loewis.de>2014-03-30 19:07:25 (GMT)
committerMartin v. Löwis <martin@v.loewis.de>2014-03-30 19:07:25 (GMT)
commitc00d39e96aff698a8777120f9537e261c06be0ef (patch)
treecda5f37bb98e783d7006ec064b24b8d8968247ff /Tools/freeze/freeze.py
parent3a4340325b153eab1f1bb1b91882d777fe6bcb21 (diff)
downloadcpython-c00d39e96aff698a8777120f9537e261c06be0ef.zip
cpython-c00d39e96aff698a8777120f9537e261c06be0ef.tar.gz
cpython-c00d39e96aff698a8777120f9537e261c06be0ef.tar.bz2
Issue #16047: Fix module exception list and __file__ handling in freeze.
Patch by Meador Inge.
Diffstat (limited to 'Tools/freeze/freeze.py')
-rwxr-xr-xTools/freeze/freeze.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/Tools/freeze/freeze.py b/Tools/freeze/freeze.py
index d0e3c3f..e0c6c2c 100755
--- a/Tools/freeze/freeze.py
+++ b/Tools/freeze/freeze.py
@@ -365,6 +365,10 @@ def main():
else:
mf.load_file(mod)
+ # Alias "importlib._bootstrap" to "_frozen_importlib" so that the
+ # import machinery can bootstrap.
+ mf.modules["_frozen_importlib"] = mf.modules["importlib._bootstrap"]
+
# Add the main script as either __main__, or the actual module name.
if python_entry_is_main:
mf.run_script(scriptfile)