mirror of
https://github.com/python/cpython.git
synced 2025-10-17 20:28:43 +00:00
Support for freezing packages (Just).
This commit is contained in:
parent
201f46de2c
commit
b93f52158b
4 changed files with 58 additions and 12 deletions
|
@ -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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue