Skip to content

Commit

Permalink
Fix the docs run failing on Travis
Browse files Browse the repository at this point in the history
Likely that the deprecation warning from cryptography is causing the
setup.py sphinx build command to return an error so the tox/travis job
is marked as failing. Changing to calling the sphinx-build command
directly solves this.

Also updated the sphinx config for built-in napoleon and faster builds
using jobs option.
  • Loading branch information
cas-- committed Jul 28, 2018
1 parent e8e649a commit 3fc9767
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 9 deletions.
1 change: 0 additions & 1 deletion docs/rtd_requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
twisted
pyopenssl
sphinxcontrib-napoleon
pyxdg
service_identity
pillow
Expand Down
7 changes: 6 additions & 1 deletion docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,12 @@ def __or__(self, __):

# Add any Sphinx extension module names here, as strings. They can be extensions
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
extensions = ['sphinx.ext.autodoc', 'sphinx.ext.doctest', 'sphinxcontrib.napoleon', 'sphinx.ext.coverage']
extensions = [
'sphinx.ext.autodoc',
'sphinx.ext.doctest',
'sphinx.ext.napoleon',
'sphinx.ext.coverage',
]

# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
Expand Down
3 changes: 2 additions & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
[build_docs]
source-dir = docs/source
build-dir = docs/build
all_files = 1
all_files = true
fresh-env = true

[py2app]
app = ['deluge/ui/ui_entry.py']
Expand Down
8 changes: 2 additions & 6 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,6 @@ changedir = docs
deps =
{[testenv]deps}
sphinx
sphinxcontrib-napoleon
whitelist_externals =
{[testenv]whitelist_externals}

Expand All @@ -185,11 +184,8 @@ sitepackages = {[docsbase]sitepackages}
deps = {[docsbase]deps}
commands =
python setup.py clean_docs
python -c "print '> sphinx-apidoc --force -o docs/source/modules/ deluge deluge/plugins\n'\
'> sphinx-build -v -E -T -b html -d docs/build/doctrees docs/source docs/build/html';\
import subprocess, sys; proc = subprocess.Popen(\
'python setup.py build_docs', shell=True, stderr=subprocess.PIPE);\
err = proc.communicate()[1]; print err; sys.exit(bool(err))"
sphinx-apidoc --force -o docs/source/modules/ deluge deluge/plugins
sphinx-build -v -j auto -E -T -b html -d docs/build/doctrees docs/source docs/build/html

[testenv:docscoverage]
sitepackages = {[docsbase]sitepackages}
Expand Down

0 comments on commit 3fc9767

Please sign in to comment.