Skip to content

Commit

Permalink
Use venv when building docs
Browse files Browse the repository at this point in the history
MacOS and homebrew don't like installing global Python packages, so
this solves that automatically.
  • Loading branch information
mtdowling committed Jul 19, 2024
1 parent 6466fe7 commit 4cdef73
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions docs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,20 @@
SPHINXOPTS =
SPHINXBUILD = python3 -msphinx
SPHINXPROJ = Smithy
SHELL := /bin/bash

install:
pip3 install -r requirements.txt .
pip3 install -e .
python3 -m venv build/venv
source build/venv/bin/activate && pip3 install -r requirements.txt . && pip3 install -e .

clean:
-rm -rf build/*

html1:
@$(SPHINXBUILD) -M html "source-1.0" "build/1.0" $(SPHINXOPTS) -W --keep-going -n $(O)
@source build/venv/bin/activate && $(SPHINXBUILD) -M html "source-1.0" "build/1.0" $(SPHINXOPTS) -W --keep-going -n $(O)

html2:
@$(SPHINXBUILD) -M html "source-2.0" "build/2.0" $(SPHINXOPTS) -W --keep-going -n $(O)
@source build/venv/bin/activate && $(SPHINXBUILD) -M html "source-2.0" "build/2.0" $(SPHINXOPTS) -W --keep-going -n $(O)

html: html2 html1 merge-versions

Expand Down

0 comments on commit 4cdef73

Please sign in to comment.