Skip to content

Commit e94094a

Browse files
committed
docs: restore ReadTheDocs support; modernize docs generation
We add a `.readthedocs.yaml` so RTD builds work again. We add a dedicated requirements file for documentation. Sphinx is updated to latest.
1 parent 3aa6222 commit e94094a

File tree

5 files changed

+324
-5
lines changed

5 files changed

+324
-5
lines changed

.github/workflows/sphinx.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,8 @@ jobs:
1919
env:
2020
PIP_CONSTRAINT: 'ci/constraints.txt'
2121
run: |
22-
uv venv --python 3.12 venv
23-
source venv/bin/activate
24-
uv pip install -r ci/requirements.txt
22+
uv venv --python 3.13 venv
23+
uv pip install -r ci/requirements.docs.txt
2524
uv pip install --config-settings=--build-option=--no-c-backend .
26-
uv pip install Sphinx==5.3.0
25+
source venv/bin/activate
2726
make -C docs html

.readthedocs.yaml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
version: 2
2+
formats:
3+
- htmlzip
4+
- epub
5+
build:
6+
os: ubuntu-24.04
7+
tools:
8+
python: "3.13"
9+
jobs:
10+
create_environment:
11+
- python3 -m venv venv
12+
- venv/bin/python3 -m pip install -c ci/constraints.txt -r ci/requirements.docs.txt
13+
- venv/bin/python3 -m pip install --config-settings=--build-option=--no-c-backend .
14+
build:
15+
htmlzip:
16+
- make -C docs html SPHINXBUILD=$(pwd)/venv/bin/sphinx-build BUILDDIR=$READTHEDOCS_OUTPUT
17+
epub:
18+
- make -C docs epub SPHINXBUILD=$(pwd)/venv/bin/sphinx-build
19+
- cp docs/_build/epub/python-zstandard.epub "${READTHEDOCS_OUTPUT}/"

ci/requirements.docs.in

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
cffi
2+
Sphinx

0 commit comments

Comments
 (0)