Skip to content

Commit cd01055

Browse files
Standardise docs build: use __PKG_VERSION__, uv-based build.sh, minimal Makefile
1 parent 707f478 commit cd01055

3 files changed

Lines changed: 4 additions & 15 deletions

File tree

docs/Makefile

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,5 @@
1-
2-
# Need to set PYTHONPATH so that we pick up the local msprime
3-
PYPATH=${PWD}/..
4-
MSP_VERSION:=$(shell PYTHONPATH=${PYPATH} \
5-
python3 -c 'import msprime; print(msprime.__version__.split("+")[0])')
6-
7-
dev:
8-
PYTHONPATH=${PYPATH} ./build.sh
9-
10-
dist:
11-
@echo Building distribution for msprime version ${MSP_VERSION}
12-
sed -i s/__MSPRIME_VERSION__/${MSP_VERSION}/g _config.yml
13-
PYTHONPATH=${PYPATH} ./build.sh
1+
all:
2+
./build.sh
143

154
clean:
165
rm -fR _build

docs/_config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ sphinx:
4242
navigation_with_keys: false
4343
pygments_dark_style: monokai
4444
logo:
45-
text: "Version __MSPRIME_VERSION__"
45+
text: "Version __PKG_VERSION__"
4646
myst_enable_extensions:
4747
- colon_fence
4848
- deflist

docs/build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
REPORTDIR=_build/html/reports
88

9-
jupyter-book build -nW --keep-going .
9+
uv run --project=.. --only-group docs jupyter-book build . -vnW --keep-going
1010
RETVAL=$?
1111
if [ $RETVAL -ne 0 ]; then
1212
if [ -e $REPORTDIR ]; then

0 commit comments

Comments
 (0)