1
0
Fork 0
mirror of https://gitlab.alpinelinux.org/alpine/aports.git synced 2025-07-22 18:55:29 +03:00
aports/community/capstone/py-path-fix.patch
stf 48c4334e08 community/capstone: fix search patch for python binding's lib
without this fix the following happens:
```
% python3 -m capstone
Traceback (most recent call last):
  File "/usr/lib/python3.7/runpy.py", line 183, in _run_module_as_main
    mod_name, mod_spec, code = _get_module_details(mod_name, _Error)
  File "/usr/lib/python3.7/runpy.py", line 142, in _get_module_details
    return _get_module_details(pkg_main_name, error)
  File "/usr/lib/python3.7/runpy.py", line 109, in _get_module_details
    __import__(pkg_name)
  File "/usr/lib/python3.7/site-packages/capstone/__init__.py", line 315, in <module>
    raise ImportError("ERROR: fail to load the dynamic library.")
ImportError: ERROR: fail to load the dynamic library.
```

it also adds a -static subpkg
2019-10-20 19:06:04 +02:00

11 lines
607 B
Diff

diff -urw src/capstone-4.0.1/bindings/python/capstone/__init__.py capstone-4.0.1/bindings/python/capstone/__init__.py
--- src/capstone-4.0.1/bindings/python/capstone/__init__.py 2019-01-10 13:45:56.000000000 +0000
+++ capstone-4.0.1/bindings/python/capstone/__init__.py 2019-10-18 20:56:27.509240524 +0000
@@ -301,6 +301,7 @@
# - last-gasp attempt at some hardcoded paths on darwin and linux
_path_list = [os.getenv('LIBCAPSTONE_PATH', None),
+ '/usr/lib/',
pkg_resources.resource_filename(__name__, 'lib'),
join(split(__file__)[0], 'lib'),
'',