Files
MINGW-packages/mingw-w64-keystone/0003-python-load-dll-from-prefix.patch
2022-05-30 13:05:19 +05:30

30 lines
854 B
Diff

--- a/bindings/python/keystone/keystone.py
+++ b/bindings/python/keystone/keystone.py
@@ -18,14 +18,14 @@
__file__ = inspect.getfile(inspect.currentframe())
_lib_path = split(__file__)[0]
-_all_libs = ('keystone.dll', 'libkeystone.so', 'libkeystone.so.%u' %KS_API_MAJOR, 'libkeystone.dylib')
+_all_libs = ('libkeystone.dll')
_found = False
for _lib in _all_libs:
try:
_lib_file = join(_lib_path, _lib)
#print(">> 0: Trying to load %s" %_lib_file);
- _ks = cdll.LoadLibrary(_lib_file)
+ _ks = cdll.LoadLibrary(_all_libs)
_found = True
break
except OSError:
--- a/bindings/python/setup.py
+++ b/bindings/python/setup.py
@@ -83,6 +83,7 @@
shutil.copy(filename, outpath)
def build_libraries():
+ return
cur_dir = os.getcwd()
if SYSTEM in ("win32", "cygwin"):