From a0e18357e7b48d91710db3420097945ec5a0d03b Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Sat, 7 Mar 1998 04:51:03 +0000 Subject: Rearrange some stuff so that the warning for unknown modules is also issued on Windows. --- Tools/freeze/freeze.py | 38 +++++++++++++++++++++----------------- 1 file changed, 21 insertions(+), 17 deletions(-) diff --git a/Tools/freeze/freeze.py b/Tools/freeze/freeze.py index 3b58243..3de6bdb 100755 --- a/Tools/freeze/freeze.py +++ b/Tools/freeze/freeze.py @@ -279,22 +279,7 @@ def main(): os.unlink(frozen_c) os.rename(backup, frozen_c) - # windows gets different treatment - if win: - # Taking a shortcut here... - import winmakemakefile - outfp = open(makefile, 'w') - try: - winmakemakefile.makemakefile(outfp, - locals(), - [frozenmain_c, - os.path.basename(frozen_c)], - os.path.basename(target)) - finally: - outfp.close() - return - - # generate config.c and Makefile + # look for unfrozen modules (builtin and of unknown origin) builtins = [] unknown = [] mods = dict.keys() @@ -307,17 +292,36 @@ def main(): else: unknown.append(mod) + # search for unknown modules in extensions directories (not on Windows) addfiles = [] - if unknown: + if unknown and not win: addfiles, addmods = \ checkextensions.checkextensions(unknown, extensions) for mod in addmods: unknown.remove(mod) builtins = builtins + addmods + + # report unknown modules if unknown: sys.stderr.write('Warning: unknown modules remain: %s\n' % string.join(unknown)) + # windows gets different treatment + if win: + # Taking a shortcut here... + import winmakemakefile + outfp = open(makefile, 'w') + try: + winmakemakefile.makemakefile(outfp, + locals(), + [frozenmain_c, + os.path.basename(frozen_c)], + os.path.basename(target)) + finally: + outfp.close() + return + + # generate config.c and Makefile builtins.sort() infp = open(config_c_in) backup = config_c + '~' -- cgit v0.12