Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 206bd57

Browse files
committed
When we're freezing to sourcecode and one of the modules is a dynamic module that is in a package we freeze that module at toplevel (outside any package). Not optimal, but there is little more we can do as config.c has no way to specify a builtin module has to be dumped into a package.
1 parent 60aa4cc commit 206bd57

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

Mac/Tools/macfreeze/macgen_src.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,10 @@ def generate(output, module_dict, debug=0, with_ifdef=0):
8888
c_modules = []
8989
for module in module_dict.keys():
9090
if module_dict[module].gettype() in ('builtin', 'dynamic'):
91+
# if the module is in a package we have no choice but
92+
# to put it at the toplevel in the frozen application.
93+
if '.' in module:
94+
module = module.split('.')[-1]
9195
c_modules.append(module)
9296
ifp = open(CONFIG_TEMPLATE)
9397
ofp = open(config_name, 'w')

0 commit comments

Comments
 (0)