Skip to content

Commit b301bdd

Browse files
committed
Run sphinx in a tox environment
1 parent 9ef5a3e commit b301bdd

3 files changed

Lines changed: 25 additions & 10 deletions

File tree

Makefile

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,17 +24,13 @@ test: lint
2424
tox -e py3
2525
tox -e integration
2626

27-
2827
.PHONY: lint
2928
lint:
3029
tox -e lint
3130

3231
.PHONY: docs
33-
docs: .tox
34-
$(PIP) install -r docs/requirements.txt
35-
rm -rf docs/_build/
36-
$(BIN)/sphinx-build -b html docs/ docs/_build/
37-
cd docs/_build/ && zip -r docs.zip *
32+
docs:
33+
tox -e docs
3834

3935
.PHONY: release
4036
release:

docs/requirements.txt

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
1-
pytz<2018.0,>=2017.2 # conflict between sphinx and macaroonbakery
2-
pymacaroons>=0.13.0,<1.0 # force new version with pynacl instead of libnacl
3-
sphinx==1.6.5
1+
pytz
2+
pymacaroons
3+
sphinx==4.3.2
44
sphinxcontrib-asyncio
55
sphinx_rtd_theme
6+
websockets
7+
typing-inspect
8+
pyyaml
9+
pyasn1
10+
pyrfc3339
11+
paramiko
12+
macaroonbakery
13+
toposort
14+
python-dateutil
15+
kubernetes

tox.ini

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# and then run "tox" from this directory.
55

66
[tox]
7-
envlist = lint,py3,py38,py39,py310
7+
envlist = lint,py3,py38,py39,py310,docs
88
skipsdist=True
99

1010
[pytest]
@@ -42,6 +42,15 @@ deps =
4242
kubernetes
4343
cffi
4444

45+
[testenv:docs]
46+
deps =
47+
-r docs/requirements.txt
48+
49+
allowlist_externals = rm
50+
commands =
51+
rm -rf docs/_build/
52+
sphinx-build -b html docs/ docs/_build/
53+
4554
[testenv:lint]
4655
commands =
4756
flake8 {posargs} juju tests examples

0 commit comments

Comments
 (0)