Skip to content

Commit

Permalink
dist: Fix issue when deploy_libs in .whl have inconsistent suffixes
Browse files Browse the repository at this point in the history
  • Loading branch information
rdb committed Feb 25, 2022
1 parent 7ccf38a commit cfc11ba
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions direct/src/dist/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -1030,12 +1030,9 @@ def create_runtime(platform, appname, mainscript, use_console):
self.warn("Detected use of tkinter, but tkinter is not specified in requirements.txt!")

# Copy extension modules
whl_modules = []
whl_modules_ext = ''
whl_modules = {}
if use_wheels:
# Get the module libs
whl_modules = []

for i in p3dwhl.namelist():
if not i.startswith('deploy_libs/'):
continue
Expand All @@ -1050,8 +1047,7 @@ def create_runtime(platform, appname, mainscript, use_console):

base = os.path.basename(i)
module, _, ext = base.partition('.')
whl_modules.append(module)
whl_modules_ext = ext
whl_modules[module] = i

# Make sure to copy any builtins that have shared objects in the
# deploy libs, assuming they are not already in freezer_extras.
Expand Down Expand Up @@ -1103,7 +1099,7 @@ def create_runtime(platform, appname, mainscript, use_console):
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))#'{0}/deploy_libs/{1}.{2}'.format(p3dwhlfn, module, whl_modules_ext)
source_path = os.path.join(p3dwhlfn, whl_modules[module])
basename = os.path.basename(source_path)
#XXX should we remove python version string here too?
else:
Expand Down

0 comments on commit cfc11ba

Please sign in to comment.