]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[ 684677 ] Allow freeze to exclude implicits
authorJust van Rossum <just@letterror.com>
Sat, 8 Mar 2003 19:50:38 +0000 (19:50 +0000)
committerJust van Rossum <just@letterror.com>
Sat, 8 Mar 2003 19:50:38 +0000 (19:50 +0000)
Tools/freeze/freeze.py

index 2c59807733adaceda2beb97e4daf4c079aed0857..8d1ffdfc1c12ee9df913e1fe943e586ac1f8a444 100755 (executable)
@@ -130,9 +130,6 @@ def main():
 
     fail_import = exclude[:]
 
-    # modules that are imported by the Python runtime
-    implicits = ["site", "exceptions"]
-
     # output files
     frozen_c = 'frozen.c'
     config_c = 'config.c'
@@ -202,6 +199,12 @@ def main():
             f,r = a.split("=", 2)
             replace_paths.append( (f,r) )
 
+    # modules that are imported by the Python runtime
+    implicits = []
+    for module in ('site', 'exceptions',):
+        if module not in exclude:
+            implicits.append(module)
+
     # default prefix and exec_prefix
     if not exec_prefix:
         if prefix: