From 94ce0d19631cc6e72518044dd2f3a97f135c5d60 Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Mon, 8 Dec 1997 05:01:06 +0000 Subject: [PATCH] Add special handling for Python modules that are imported implicitly by the Python runtime: 'site' and 'exceptions'. --- Tools/freeze/freeze.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Tools/freeze/freeze.py b/Tools/freeze/freeze.py index 1f0356b071..b584ec598f 100755 --- a/Tools/freeze/freeze.py +++ b/Tools/freeze/freeze.py @@ -85,6 +85,9 @@ def main(): odir = '' win = sys.platform[:3] == 'win' + # modules that are imported by the Python runtime + implicits = ["site", "exceptions"] + # output files frozen_c = 'frozen.c' config_c = 'config.c' @@ -217,6 +220,9 @@ def main(): target = os.path.join(odir, target) makefile = os.path.join(odir, makefile) + for mod in implicits: + modules.append(findmodules.findmodule(mod)) + # Actual work starts here... dict = findmodules.findmodules(scriptfile, modules, path) -- 2.50.1