mirror of
https://github.com/panda3d/panda3d.git
synced 2025-09-29 16:20:11 -04:00
parent
c325eabb9d
commit
91dd802de6
12
direct/src/dist/FreezeTool.py
vendored
12
direct/src/dist/FreezeTool.py
vendored
@ -1215,6 +1215,18 @@ class Freezer:
|
|||||||
else:
|
else:
|
||||||
self.__loadModule(self.ModuleDef(modname, implicit = True))
|
self.__loadModule(self.ModuleDef(modname, implicit = True))
|
||||||
|
|
||||||
|
# Special case for sysconfig, which depends on a platform-specific
|
||||||
|
# sysconfigdata module on POSIX systems.
|
||||||
|
if 'sysconfig' in self.mf.modules:
|
||||||
|
if sys.version_info >= (3, 6):
|
||||||
|
if 'linux' in self.platform:
|
||||||
|
arch = self.platform.split('_', 1)[1]
|
||||||
|
self.__loadModule(self.ModuleDef('_sysconfigdata__linux_' + arch + '-linux-gnu', implicit=True))
|
||||||
|
elif 'mac' in self.platform:
|
||||||
|
self.__loadModule(self.ModuleDef('_sysconfigdata__darwin_darwin', implicit=True))
|
||||||
|
elif 'linux' in self.platform or 'mac' in self.platform:
|
||||||
|
self.__loadModule(self.ModuleDef('_sysconfigdata', implicit=True))
|
||||||
|
|
||||||
# Now, any new modules we found get added to the export list.
|
# Now, any new modules we found get added to the export list.
|
||||||
for origName in list(self.mf.modules.keys()):
|
for origName in list(self.mf.modules.keys()):
|
||||||
if origName not in origToNewName:
|
if origName not in origToNewName:
|
||||||
|
@ -687,6 +687,21 @@ __version__ = '{0}'
|
|||||||
|
|
||||||
whl.write_file(target_path, source_path)
|
whl.write_file(target_path, source_path)
|
||||||
|
|
||||||
|
# Include the special sysconfigdata module.
|
||||||
|
if os.name == 'posix':
|
||||||
|
import sysconfig
|
||||||
|
|
||||||
|
if hasattr(sysconfig, '_get_sysconfigdata_name'):
|
||||||
|
modname = sysconfig._get_sysconfigdata_name() + '.py'
|
||||||
|
else:
|
||||||
|
modname = '_sysconfigdata.py'
|
||||||
|
|
||||||
|
for entry in sys.path:
|
||||||
|
source_path = os.path.join(entry, modname)
|
||||||
|
if os.path.isfile(source_path):
|
||||||
|
whl.write_file('deploy_libs/' + modname, source_path)
|
||||||
|
break
|
||||||
|
|
||||||
# Add plug-ins.
|
# Add plug-ins.
|
||||||
for lib in PLUGIN_LIBS:
|
for lib in PLUGIN_LIBS:
|
||||||
plugin_name = 'lib' + lib
|
plugin_name = 'lib' + lib
|
||||||
|
Loading…
x
Reference in New Issue
Block a user