mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-04 10:54:24 -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
|
return None
|
||||||
|
|
||||||
try:
|
try:
|
||||||
fp = zip.open(fn, 'r')
|
fp = zip.open(fn.replace(os.path.sep, '/'), 'r')
|
||||||
except KeyError:
|
except KeyError:
|
||||||
return None
|
return None
|
||||||
|
|
||||||
@ -1803,13 +1803,13 @@ class PandaModuleFinder(modulefinder.ModuleFinder):
|
|||||||
|
|
||||||
# Look for recognized extensions.
|
# Look for recognized extensions.
|
||||||
for stuff in self.suffixes:
|
for stuff in self.suffixes:
|
||||||
suffix, mode, type = stuff
|
suffix, mode, _ = stuff
|
||||||
fp = self._open_file(basename + suffix, mode)
|
fp = self._open_file(basename + suffix, mode)
|
||||||
if fp:
|
if fp:
|
||||||
return (fp, basename + suffix, stuff)
|
return (fp, basename + suffix, stuff)
|
||||||
|
|
||||||
# Consider a package, i.e. a directory containing __init__.py.
|
# 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)
|
init = os.path.join(basename, '__init__' + suffix)
|
||||||
if self._open_file(init, mode):
|
if self._open_file(init, mode):
|
||||||
return (None, basename, ('', '', imp.PKG_DIRECTORY))
|
return (None, basename, ('', '', imp.PKG_DIRECTORY))
|
||||||
|
@ -209,7 +209,7 @@ class build_apps(distutils.core.Command):
|
|||||||
else:
|
else:
|
||||||
# Builtin module, but might not be builtin in wheel libs, so double check
|
# Builtin module, but might not be builtin in wheel libs, so double check
|
||||||
if module in whl_modules:
|
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)
|
basename = os.path.basename(source_path)
|
||||||
else:
|
else:
|
||||||
continue
|
continue
|
||||||
|
Loading…
x
Reference in New Issue
Block a user