From d659a3b0ffc13770feb05da07662f9c116a86845 Mon Sep 17 00:00:00 2001 From: rdb Date: Mon, 29 Jun 2020 11:58:00 +0200 Subject: [PATCH] dist: fix location of numpy/Pillow shared libraries Fixes #914 --- direct/src/dist/commands.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/direct/src/dist/commands.py b/direct/src/dist/commands.py index 632d9c9859..cc281fb4e3 100644 --- a/direct/src/dist/commands.py +++ b/direct/src/dist/commands.py @@ -674,12 +674,16 @@ class build_apps(setuptools.Command): rootdir = wf.split(os.path.sep, 1)[0] search_path.append(os.path.join(whl, rootdir, '.libs')) + # Also look for eg. numpy.libs or Pillow.libs in the root + whl_name = os.path.basename(whl).split('-', 1)[0] + search_path.append(os.path.join(whl, whl_name + '.libs')) + # Also look for more specific per-package cases, defined in # PACKAGE_LIB_DIRS at the top of this file. - whl_name = os.path.basename(whl).split('-', 1)[0] extra_dirs = PACKAGE_LIB_DIRS.get(whl_name, []) for extra_dir in extra_dirs: search_path.append(os.path.join(whl, extra_dir.replace('/', os.path.sep))) + return search_path def create_runtime(appname, mainscript, use_console):