]> granicus.if.org Git - python/commitdiff
When we're freezing to sourcecode and one of the modules is a dynamic module that...
authorJack Jansen <jack.jansen@cwi.nl>
Mon, 27 Aug 2001 13:59:35 +0000 (13:59 +0000)
committerJack Jansen <jack.jansen@cwi.nl>
Mon, 27 Aug 2001 13:59:35 +0000 (13:59 +0000)
Mac/Tools/macfreeze/macgen_src.py

index c3e45411e8f20aa3e839880d321e373cf3edb119..089727a81a450b917461169f379d318cfac43d23 100644 (file)
@@ -88,6 +88,10 @@ def generate(output, module_dict, debug=0, with_ifdef=0):
                c_modules = []
                for module in module_dict.keys():
                        if module_dict[module].gettype() in ('builtin', 'dynamic'):
+                               # if the module is in a package we have no choice but
+                               # to put it at the toplevel in the frozen application.
+                               if '.' in module:
+                                       module = module.split('.')[-1]
                                c_modules.append(module)
                ifp = open(CONFIG_TEMPLATE)
                ofp = open(config_name, 'w')