From f9f43f1a8f2daeb8c538ad7b03cfdf90188ce1aa Mon Sep 17 00:00:00 2001 From: Akihiro Motoki Date: Tue, 8 May 2018 06:58:06 +0900 Subject: [PATCH] Follow the new PTI for document build The detail is described in the following links: https://governance.openstack.org/tc/reference/project-testing-interface.html http://lists.openstack.org/pipermail/openstack-dev/2017-December/125710.html Our documentation build actually does not depends on Django as we don't create source code reference. It is a good chance to drop Django dependencies from the doc build. Change-Id: I7323187a40dbd41848cee983a90dfcf29d74a77d --- doc/requirements.txt | 6 ++++++ doc/source/conf.py | 10 ---------- lower-constraints.txt | 6 +++--- setup.cfg | 9 --------- test-requirements.txt | 3 --- tox.ini | 8 +++++++- 6 files changed, 16 insertions(+), 26 deletions(-) create mode 100644 doc/requirements.txt diff --git a/doc/requirements.txt b/doc/requirements.txt new file mode 100644 index 0000000..012efb2 --- /dev/null +++ b/doc/requirements.txt @@ -0,0 +1,6 @@ +# The order of packages is significant, because pip processes them in the order +# of appearance. Changing the order has an impact on the overall integration +# process, which may cause wedges in the gate later. +sphinx!=1.6.6,!=1.6.7,>=1.6.2 # BSD +openstackdocstheme>=1.18.1 # Apache-2.0 +reno>=2.5.0 # Apache-2.0 diff --git a/doc/source/conf.py b/doc/source/conf.py index 33ed074..c33d3b3 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -27,8 +27,6 @@ from __future__ import print_function import os import sys -import django - import neutron_vpnaas_dashboard.version PROJECT = 'neutron-vpnaas-dashboard' @@ -37,14 +35,6 @@ ROOT = os.path.abspath(os.path.join(BASE_DIR, "..", "..")) sys.path.insert(0, ROOT) -# This is required for ReadTheDocs.org, but isn't a bad idea anyway. -os.environ.setdefault('DJANGO_SETTINGS_MODULE', - 'neutron_vpnaas_dashboard.test.settings') - - -django.setup() - - # If extensions (or modules to document with autodoc) are in another directory, # add these directories to sys.path here. If the directory is relative to the # documentation root, use os.path.abspath to make it absolute, like shown here. diff --git a/lower-constraints.txt b/lower-constraints.txt index 33fadb1..d6fcdfc 100644 --- a/lower-constraints.txt +++ b/lower-constraints.txt @@ -13,9 +13,9 @@ cryptography==2.1 debtcollector==1.2.0 decorator==3.4.0 deprecation==1.0 -Django==1.8 +Django==1.11 django-appconf==1.0.2 -django-babel==0.5.1 +django-babel==0.6.2 django-compressor==2.0 django-nose==1.4.4 django-pyscss==2.0.2 @@ -112,7 +112,7 @@ semantic-version==2.3.1 simplejson==3.5.1 six==1.10.0 snowballstemmer==1.2.1 -Sphinx==1.6.5 +Sphinx==1.6.2 sphinxcontrib-websupport==1.0.1 statsd==3.2.1 stevedore==1.20.0 diff --git a/setup.cfg b/setup.cfg index 992810d..98c64d3 100644 --- a/setup.cfg +++ b/setup.cfg @@ -21,12 +21,3 @@ classifier = [files] packages = neutron_vpnaas_dashboard - -[build_sphinx] -source-dir = doc/source -build-dir = doc/build -all-files = 1 -warning-is-error = 1 - -[upload_sphinx] -upload-dir = doc/build/html diff --git a/test-requirements.txt b/test-requirements.txt index ea4e9b3..046934b 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -10,9 +10,6 @@ django-nose>=1.4.4 # BSD flake8-import-order==0.13 # LGPLv3 mock>=2.0.0 # BSD python-subunit>=1.0.0 # Apache-2.0/BSD -sphinx!=1.6.6,!=1.6.7,>=1.6.2 # BSD -openstackdocstheme>=1.18.1 # Apache-2.0 testrepository>=0.0.18 # Apache-2.0/BSD testscenarios>=0.4 # Apache-2.0/BSD testtools>=2.2.0 # MIT -reno>=2.5.0 # Apache-2.0 diff --git a/tox.ini b/tox.ini index 2a0d97e..90fd89c 100644 --- a/tox.ini +++ b/tox.ini @@ -42,9 +42,15 @@ commands = {[unit_tests]commands} [testenv:docs] -commands = python setup.py build_sphinx +deps = + -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} + -r{toxinidir}/doc/requirements.txt +commands = sphinx-build -W -b html doc/source doc/build/html [testenv:releasenotes] +deps = + -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} + -r{toxinidir}/doc/requirements.txt commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html [flake8]