Skip to content

Commit

Permalink
Try to set libclang for ubuntu
Browse files Browse the repository at this point in the history
  • Loading branch information
jbcoe committed Mar 31, 2024
1 parent c07814d commit 8512263
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,5 @@ jobs:
- name: Tests
run: |
source ./.venv/bin/activate
CPP_MODEL_LIBCLANG_PATH=/usr/lib/x86_64-linux-gnu/libclang-10.so.1 \
PY_CPPMODEL_LIBCLANG_PATH=/usr/lib/x86_64-linux-gnu/libclang-10.so.1 \
python -m unittest discover .
4 changes: 1 addition & 3 deletions test_py_cppmodel.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,7 @@

LIBCLANG_PATH = os.environ.get("PY_CPPMODEL_LIBCLANG_PATH")
if not LIBCLANG_PATH:
LIBCLANG_PATH = find_library("clang")
if not LIBCLANG_PATH:
raise RuntimeError("PY_CPPMODEL_LIBCLANG_PATH is unset")
raise RuntimeError("PY_CPPMODEL_LIBCLANG_PATH is unset")

clang.cindex.Config.set_library_file(LIBCLANG_PATH) # type: ignore

Expand Down

0 comments on commit 8512263

Please sign in to comment.