From e292fedd913593dc4399b357e476ef7a9a22b1d5 Mon Sep 17 00:00:00 2001 From: rdb Date: Sun, 13 May 2018 22:56:44 +0200 Subject: [PATCH] deploy-ng: add .libs directory in .whl to search path This seems to be a convention imposed by auditwheel and used by numpy. --- direct/src/showutil/dist.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/direct/src/showutil/dist.py b/direct/src/showutil/dist.py index e916a4d316..6017831261 100644 --- a/direct/src/showutil/dist.py +++ b/direct/src/showutil/dist.py @@ -504,6 +504,14 @@ class build_apps(setuptools.Command): if use_wheels: search_path.append(os.path.join(p3dwhlfn, 'deploy_libs')) + # If the .whl containing this file has a .libs directory, add + # it to the path. This is an auditwheel/numpy convention. + if '.whl' + os.sep in source_path: + whl, wf = source_path.split('.whl' + os.path.sep) + whl += '.whl' + rootdir = wf.split(os.path.sep, 1)[0] + search_path.append(os.path.join(whl, rootdir, '.libs')) + target_path = os.path.join(builddir, basename) self.copy_with_dependencies(source_path, target_path, search_path)