File: 0003-Use-system-clang.patch

package info (click to toggle)
python-opencascade-pywrap 0.0~git20250714210719.b608b60-4
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 12,992 kB
  • sloc: python: 1,622; pascal: 32; makefile: 13; sh: 1
file content (32 lines) | stat: -rw-r--r-- 1,099 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
From: Roland Mas <roland.mas@entierement.net>
Date: Sun, 27 Apr 2025 16:31:31 +0200
Subject: Use system clang

---
 bindgen/utils.py | 13 +------------
 1 file changed, 1 insertion(+), 12 deletions(-)

diff --git a/bindgen/utils.py b/bindgen/utils.py
index 49f7adc..ea0f2b2 100644
--- a/bindgen/utils.py
+++ b/bindgen/utils.py
@@ -57,18 +57,7 @@ def init_clang(path=None):
     global initialized, ix
 
     if not initialized:
-        conda_prefix = Path(getenv("CONDA_PREFIX", ""))
-
-        if path:
-            pass
-        elif platform.startswith("win"):
-            path = conda_prefix / "Library" / "bin" / "libclang.dll"
-        elif platform.startswith("linux") or platform.startswith("freebsd"):
-            path = conda_prefix / "lib" / "libclang.so"
-        elif platform.startswith("darwin"):
-            path = conda_prefix / "lib" / "libclang.dylib"
-
-        Config.set_library_file(path)
+        Config.set_library_file('/usr/lib/llvm-20/lib/libclang.so')
 
         # Monkeypatch clang
         monkeypatch_cursor("is_virtual", "clang_isVirtualBase", [Cursor], c_uint)