Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doc: switch back to libclang to avoid hardcoding LLVM version #72

Merged
merged 1 commit into from
Oct 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion doc/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
clang <= 14
libclang
hawkmoth
sphinx
sphinx_rtd_theme
20 changes: 0 additions & 20 deletions doc/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,9 @@
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
#
from glob import glob
import os
import sys
from hawkmoth.util import readthedocs
from hawkmoth.util import compiler
from clang.cindex import Config as clang_config

# -- Project information -----------------------------------------------------

Expand Down Expand Up @@ -62,20 +59,3 @@
hawkmoth_clang = compiler.get_include_args()
# we need build to get version.h
hawkmoth_clang.append(f"-I{os.path.abspath('../../build')}")
if sys.platform == 'darwin':
lib_search_dirs = [
'/usr/lib',
'/usr/local/lib',
'/Library/Developer/CommandLineTools/usr/lib',
]
elif sys.platform == 'windows':
lib_search_dirs = []
else:
# we are nailed to clang-14 by readthedocs, so we must look in llvm-14
# for libclang.so
lib_search_dirs = [
'/usr/lib',
'/usr/local/lib',
] + glob('/usr/lib/llvm-14/lib')
for lib_dir in lib_search_dirs:
clang_config.set_library_path(lib_dir)