From 3fc97672de5ef74ec5281aab3d1d0d68b120ee38 Mon Sep 17 00:00:00 2001 From: Calum Lind Date: Sat, 28 Jul 2018 08:14:25 +0100 Subject: [PATCH] Fix the docs run failing on Travis 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. --- docs/rtd_requirements.txt | 1 - docs/source/conf.py | 7 ++++++- setup.cfg | 3 ++- tox.ini | 8 ++------ 4 files changed, 10 insertions(+), 9 deletions(-) diff --git a/docs/rtd_requirements.txt b/docs/rtd_requirements.txt index c8c6c8f4f..ded862b5d 100644 --- a/docs/rtd_requirements.txt +++ b/docs/rtd_requirements.txt @@ -1,6 +1,5 @@ twisted pyopenssl -sphinxcontrib-napoleon pyxdg service_identity pillow diff --git a/docs/source/conf.py b/docs/source/conf.py index 2326f5adc..bed14d95c 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -73,7 +73,12 @@ for mod_name in MOCK_MODULES: # 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'] diff --git a/setup.cfg b/setup.cfg index d7e14b609..9fee85746 100644 --- a/setup.cfg +++ b/setup.cfg @@ -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'] diff --git a/tox.ini b/tox.ini index 126f5796b..aa3aa7ce9 100644 --- a/tox.ini +++ b/tox.ini @@ -176,7 +176,6 @@ changedir = docs deps = {[testenv]deps} sphinx - sphinxcontrib-napoleon whitelist_externals = {[testenv]whitelist_externals} @@ -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}