Skip to content

Commit e749c22

Browse files
committed
Adding tox env for building with READTHEDOCS theme.
1 parent 73f1a2d commit e749c22

2 files changed

Lines changed: 11 additions & 0 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ nosetests.xml
3838

3939
# Built documentation
4040
docs/_build
41+
docs/_build_rtd
4142

4243
# Virtual environment
4344
env/

tox.ini

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,16 @@ deps =
4242
Sphinx
4343
passenv = {[testenv:system-tests]passenv} SPHINX_RELEASE READTHEDOCS LOCAL_RTD
4444

45+
[testenv:docs-rtd]
46+
setenv =
47+
LOCAL_RTD = True
48+
basepython = {[testenv:docs]basepython}
49+
commands =
50+
python -c "import shutil; shutil.rmtree('docs/_build_rtd', ignore_errors=True)"
51+
sphinx-build -W -b html -d docs/_build_rtd/doctrees docs docs/_build_rtd/html
52+
deps = {[testenv:docs]deps}
53+
passenv = {[testenv:docs]passenv}
54+
4555
[pep8]
4656
exclude = gcloud/datastore/_datastore_v1_pb2.py,docs/conf.py
4757
verbose = 1

0 commit comments

Comments
 (0)