summaryrefslogtreecommitdiffstats
path: root/Tools/freeze/freeze.py
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1998-04-23 14:39:24 (GMT)
committerGuido van Rossum <guido@python.org>1998-04-23 14:39:24 (GMT)
commita937afd363de79433ccdaea6643b8907410d3ba8 (patch)
treed95d9bf78239a2f21ca0b21ecb0d630064a6da3c /Tools/freeze/freeze.py
parent1abfb9c0f5af3727dfa09023a85834e40bba1cf3 (diff)
downloadcpython-a937afd363de79433ccdaea6643b8907410d3ba8.zip
cpython-a937afd363de79433ccdaea6643b8907410d3ba8.tar.gz
cpython-a937afd363de79433ccdaea6643b8907410d3ba8.tar.bz2
Freeze assumes that all built-in modules are part of the Python core.
This is not necessarily the case. It is possible to create a Python binary which contains built-in extension modules. Therefore checkextensions should be used for all unknown and builtin modules. (Sjoerd Mullender)
Diffstat (limited to 'Tools/freeze/freeze.py')
-rwxr-xr-xTools/freeze/freeze.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/Tools/freeze/freeze.py b/Tools/freeze/freeze.py
index 0cdacd0..15e9e14 100755
--- a/Tools/freeze/freeze.py
+++ b/Tools/freeze/freeze.py
@@ -338,13 +338,15 @@ def main():
# search for unknown modules in extensions directories (not on Windows)
addfiles = []
addmoddefns = [] # Windows list of modules.
- if unknown:
+ if unknown or (not win and builtins):
if not win:
addfiles, addmods = \
- checkextensions.checkextensions(unknown, extensions)
+ checkextensions.checkextensions(unknown+builtins,
+ extensions)
for mod in addmods:
- unknown.remove(mod)
- builtins = builtins + addmods
+ if mod in unknown:
+ unknown.remove(mod)
+ builtins.append(mod)
else:
# Do the windows thang...
import checkextensions_win32