]> granicus.if.org Git - python/commitdiff
Add special handling for Python modules that are imported implicitly
authorGuido van Rossum <guido@python.org>
Mon, 8 Dec 1997 05:01:06 +0000 (05:01 +0000)
committerGuido van Rossum <guido@python.org>
Mon, 8 Dec 1997 05:01:06 +0000 (05:01 +0000)
by the Python runtime: 'site' and 'exceptions'.

Tools/freeze/freeze.py

index 1f0356b071638965864c6089785a55c0dfb43508..b584ec598ffa49237d5a26c0a945a0d1c5bd717a 100755 (executable)
@@ -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)