mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-01 01:07:51 -04:00
deploy-ng: Fix finding pyd files in whl files on Windows
This commit is contained in:
parent
624f28f0d5
commit
d2d76c8a75
@ -1760,7 +1760,7 @@ class PandaModuleFinder(modulefinder.ModuleFinder):
|
||||
return None
|
||||
|
||||
try:
|
||||
fp = zip.open(fn, 'r')
|
||||
fp = zip.open(fn.replace(os.path.sep, '/'), 'r')
|
||||
except KeyError:
|
||||
return None
|
||||
|
||||
@ -1803,13 +1803,13 @@ class PandaModuleFinder(modulefinder.ModuleFinder):
|
||||
|
||||
# Look for recognized extensions.
|
||||
for stuff in self.suffixes:
|
||||
suffix, mode, type = stuff
|
||||
suffix, mode, _ = stuff
|
||||
fp = self._open_file(basename + suffix, mode)
|
||||
if fp:
|
||||
return (fp, basename + suffix, stuff)
|
||||
|
||||
# Consider a package, i.e. a directory containing __init__.py.
|
||||
for suffix, mode, type in self.suffixes:
|
||||
for suffix, mode, _ in self.suffixes:
|
||||
init = os.path.join(basename, '__init__' + suffix)
|
||||
if self._open_file(init, mode):
|
||||
return (None, basename, ('', '', imp.PKG_DIRECTORY))
|
||||
|
@ -209,7 +209,7 @@ class build_apps(distutils.core.Command):
|
||||
else:
|
||||
# Builtin module, but might not be builtin in wheel libs, so double check
|
||||
if module in whl_modules:
|
||||
source_path = os.path.join(p3dwhlfn, 'deploy_libs/{}.{}'.format(module, whl_modules_ext))
|
||||
source_path = os.path.join(p3dwhlfn, 'deploy_libs/{}.{}'.format(module, whl_modules_ext))#'{0}/deploy_libs/{1}.{2}'.format(p3dwhlfn, module, whl_modules_ext)
|
||||
basename = os.path.basename(source_path)
|
||||
else:
|
||||
continue
|
||||
|
Loading…
x
Reference in New Issue
Block a user