diff --git a/direct/src/dist/commands.py b/direct/src/dist/commands.py index 4a628d292d..cd31b3073e 100644 --- a/direct/src/dist/commands.py +++ b/direct/src/dist/commands.py @@ -1030,12 +1030,9 @@ class build_apps(setuptools.Command): 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 @@ -1050,8 +1047,7 @@ class build_apps(setuptools.Command): 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. @@ -1103,7 +1099,7 @@ class build_apps(setuptools.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))#'{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: