mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-07-12 18:59:50 +03:00
As of now, running the following python code from clang import cindex cindex.Index.create() fails with: [...] clang.cindex.LibclangError: Error loading shared library libclang.so: No such file or directory. To provide a path to libclang use Config.set_library_path() or Config.set_library_file(). This could be fixed by patching every user to call cindex.Config.set_library_file("/usr/lib/libclang.so.20.1.3") before calling `cindex.Index.create()`. But adding the version of the library to the expected file name to match the installed file saves us this trouble.
15 lines
579 B
Diff
15 lines
579 B
Diff
This aids in allocating libclang.so from cindex.py. We do not install
|
|
libclang.so without version into /usr/lib to allow installing multiple versions.
|
|
Therefor, cindex.py should search for the versioned file instead.
|
|
|
|
--- a/bindings/python/clang/cindex.py
|
|
+++ b/bindings/python/clang/cindex.py
|
|
@@ -4244,7 +4244,7 @@ class Config:
|
|
elif name == "Windows":
|
|
file = "libclang.dll"
|
|
else:
|
|
- file = "libclang.so"
|
|
+ file = "libclang.so.@@SOVER@@"
|
|
|
|
if Config.library_path:
|
|
file = Config.library_path + "/" + file
|