mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-03 10:22:45 -04:00
deploy-ng: fix cross-building for Windows and Python 2
This commit is contained in:
parent
f16cd29971
commit
42d5874255
@ -742,7 +742,7 @@ class Freezer:
|
|||||||
self.moduleSuffixes += [
|
self.moduleSuffixes += [
|
||||||
('.cp{0}{1}-win_amd64.pyd'.format(*sys.version_info), 'rb', 3),
|
('.cp{0}{1}-win_amd64.pyd'.format(*sys.version_info), 'rb', 3),
|
||||||
('.cp{0}{1}-win32.pyd'.format(*sys.version_info), 'rb', 3),
|
('.cp{0}{1}-win32.pyd'.format(*sys.version_info), 'rb', 3),
|
||||||
('.dll', 'rb', 3),
|
('.pyd', 'rb', 3),
|
||||||
]
|
]
|
||||||
elif 'mac' in self.platform:
|
elif 'mac' in self.platform:
|
||||||
self.moduleSuffixes += [
|
self.moduleSuffixes += [
|
||||||
@ -1658,7 +1658,7 @@ class Freezer:
|
|||||||
# trouble importing it as a builtin module. Synthesize a frozen
|
# trouble importing it as a builtin module. Synthesize a frozen
|
||||||
# module that loads it dynamically.
|
# module that loads it dynamically.
|
||||||
if '.' in moduleName:
|
if '.' in moduleName:
|
||||||
code = 'import sys;import os;del sys.modules["%s"];import imp;imp.load_dynamic("%s",os.path.join(os.path.dirname(sys.executable), "%s%s"))' % (moduleName, moduleName, moduleName, modext)
|
code = 'import sys;del sys.modules["%s"];import sys,os,imp;imp.load_dynamic("%s",os.path.join(os.path.dirname(sys.executable), "%s%s"))' % (moduleName, moduleName, moduleName, modext)
|
||||||
code = compile(code, moduleName, 'exec')
|
code = compile(code, moduleName, 'exec')
|
||||||
code = marshal.dumps(code)
|
code = marshal.dumps(code)
|
||||||
moduleList.append(make_module_list_entry(code, codeOffset, moduleName, module))
|
moduleList.append(make_module_list_entry(code, codeOffset, moduleName, module))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user