Skip to content

Commit dae2391

Browse files
committed
Apply fix for linux2
1 parent 399f204 commit dae2391

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

bindings/python/unicorn/unicorn_py3/unicorn.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,9 @@ def _load_lib(path: Path, lib_name: str):
9292
os.getenv('LIBUNICORN_PATH'),
9393
pkg_resources.resource_filename(__name__, 'lib'),
9494
PurePath(inspect.getfile(__load_uc_lib)).parent / 'lib',
95-
''
96-
] + [PurePath(p) / 'unicorn' / 'lib' for p in sys.path]
95+
'',
96+
"/usr/local/lib/" if sys.platform == 'darwin' else '/usr/lib64',
97+
] + [PurePath(p) / 'unicorn' / 'lib' for p in sys.path] # lazymio: ??? why PATH ??
9798

9899
# filter out None elements
99100
lib_locations = tuple(Path(loc) for loc in lib_locations if loc is not None)
@@ -102,6 +103,7 @@ def _load_lib(path: Path, lib_name: str):
102103
'cygwin' : 'cygunicorn.dll',
103104
'darwin' : 'libunicorn.2.dylib',
104105
'linux' : 'libunicorn.so.2',
106+
'linux2': 'libunicorn.so.2',
105107
'win32' : 'unicorn.dll'
106108
}.get(platform, "libunicorn.so")
107109

0 commit comments

Comments
 (0)