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
This commit is contained in:
Akihiro Motoki 2018-05-08 06:58:06 +09:00
parent 508d454849
commit f9f43f1a8f
6 changed files with 16 additions and 26 deletions

6
doc/requirements.txt Normal file
View File

@ -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

View File

@ -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.

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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]