30
30
win32 = ".dll" ,
31
31
)
32
32
33
+ binary_module_name = lambda s : f"{ s } libs" # noqa: E731
34
+
33
35
34
36
def _single_preload_deps (path : str ) -> None :
35
37
"""See _find_in_package"""
@@ -45,11 +47,12 @@ def _transitive_preload_deps(module: ModuleType) -> None:
45
47
if hasattr (module , "findlibs_dependencies" ):
46
48
for module_name in module .findlibs_dependencies :
47
49
try :
48
- rec_into = importlib .import_module (module_name )
49
- ext_path = str (Path (rec_into .__file__ ).parent )
50
+ rec_into = importlib .import_module (binary_module_name (module_name ))
50
51
# NOTE we need *first* to evaluate recursive call, *then* preload,
51
52
# to ensure that dependencies are already in place
52
53
_transitive_preload_deps (rec_into )
54
+
55
+ ext_path = str (Path (rec_into .__file__ ).parent / "lib64" )
53
56
_single_preload_deps (ext_path )
54
57
except ImportError :
55
58
# NOTE we don't use ImportWarning here as thats off by default
@@ -72,10 +75,10 @@ def _find_in_package(
72
75
It would be tempting to just extend LD_LIBRARY_PATH -- alas, that won't have any
73
76
effect as the linker has been configured already by the time cpython is running"""
74
77
try :
75
- module = importlib .import_module (pkg_name + "libs" )
78
+ module = importlib .import_module (binary_module_name ( pkg_name ) )
76
79
if preload_deps :
77
80
_transitive_preload_deps (module )
78
- venv_wheel_lib = str ((Path (module .__file__ ).parent / lib_name ))
81
+ venv_wheel_lib = str ((Path (module .__file__ ).parent / "lib64" / lib_name ))
79
82
if os .path .exists (venv_wheel_lib ):
80
83
return venv_wheel_lib
81
84
except ImportError :
0 commit comments