Skip to content

Commit 8a65a0b

Browse files
committed
doc: use a separate requirements-rtd.txt for Read the Docs
RTD apparently tries to use the Ubuntu libclang.so even though the `libclang` Python package provides its own copy. A docs build on vanilla Ubuntu 22.04 doesn't, and it's not clear why. Since pinning to an older `clang` Python package is known to work, use that approach in a separate requirements-rtd.txt. Install the libclang-dev package in RTD to get the libclang.so symlink, so we don't have to reinstate the search logic in conf.py.
1 parent 662110c commit 8a65a0b

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

.readthedocs.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,13 @@ build:
44
os: "ubuntu-22.04"
55
apt_packages:
66
- clang
7+
- libclang-dev
78
tools:
89
python: "3.11"
910

1011
python:
1112
install:
12-
- requirements: doc/requirements.txt
13+
- requirements: doc/requirements-rtd.txt
1314

1415
sphinx:
1516
configuration: doc/source/conf.py

doc/requirements-rtd.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Read the Docs ignores the libclang package's embedded libclang.so for some
2+
# reason. Use the clang package, pinned to a version matching Ubuntu 22.04.
3+
clang < 15
4+
hawkmoth
5+
sphinx
6+
sphinx_rtd_theme

0 commit comments

Comments
 (0)