diff options
author | Jack Jansen <jack.jansen@cwi.nl> | 1998-08-18 12:23:11 (GMT) |
---|---|---|
committer | Jack Jansen <jack.jansen@cwi.nl> | 1998-08-18 12:23:11 (GMT) |
commit | b93f52158b57707cf94a51d5d66735d666be06d8 (patch) | |
tree | f474c02f0dc8d9ab7bae32e0838c265e10534f3d /Mac/Tools/macfreeze/macgen_bin.py | |
parent | 201f46de2c0ce193209ba24d68ce4ae711cac571 (diff) | |
download | cpython-b93f52158b57707cf94a51d5d66735d666be06d8.zip cpython-b93f52158b57707cf94a51d5d66735d666be06d8.tar.gz cpython-b93f52158b57707cf94a51d5d66735d666be06d8.tar.bz2 |
Support for freezing packages (Just).
Diffstat (limited to 'Mac/Tools/macfreeze/macgen_bin.py')
-rw-r--r-- | Mac/Tools/macfreeze/macgen_bin.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/Mac/Tools/macfreeze/macgen_bin.py b/Mac/Tools/macfreeze/macgen_bin.py index a4ee828..e293b63 100644 --- a/Mac/Tools/macfreeze/macgen_bin.py +++ b/Mac/Tools/macfreeze/macgen_bin.py @@ -128,10 +128,12 @@ def getfragname(path, dynamicfiles): def addpythonmodules(module_dict): + # XXX should really use macgen_rsrc.generate(), this does the same, but skips __main__ items = module_dict.items() items.sort() for name, module in items: - if module.gettype() != 'module' or name == "__main__": + mtype = module.gettype() + if mtype not in ['module', 'package'] or name == "__main__": continue location = module.__file__ @@ -143,7 +145,8 @@ def addpythonmodules(module_dict): continue print 'Adding module ³%s²' % name - id, name = py_resource.frompyfile(location, name, preload=0) + id, name = py_resource.frompyfile(location, name, preload=0, + ispackage=mtype=='package') def Pstring(str): if len(str) > 255: |