From: Guido van Rossum Date: Mon, 8 Dec 1997 05:01:06 +0000 (+0000) Subject: Add special handling for Python modules that are imported implicitly X-Git-Tag: v1.5b2~72 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=94ce0d19631cc6e72518044dd2f3a97f135c5d60;p=python Add special handling for Python modules that are imported implicitly by the Python runtime: 'site' and 'exceptions'. --- 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)