From bc16522329e2223ebcea6fb8e660a6e6b8705e63 Mon Sep 17 00:00:00 2001 From: melissaml Date: Fri, 23 Mar 2018 20:02:14 +0800 Subject: [PATCH] Follow the new PTI for document build For compliance with the Project Testing Interface as described in: https://governance.openstack.org/tc/reference/project-testing-interface.html For more detials information, please refer to: http://lists.openstack.org/pipermail/openstack-dev/2017-December/125710.html Change-Id: I2f6d52e61fe9a036a6565883626673d37cd89070 --- doc/requirements.txt | 5 +++++ setup.cfg | 19 ------------------- test-requirements.txt | 4 ---- tox.ini | 10 +++++++++- 4 files changed, 14 insertions(+), 24 deletions(-) create mode 100644 doc/requirements.txt diff --git a/doc/requirements.txt b/doc/requirements.txt new file mode 100644 index 000000000..a57a5cda1 --- /dev/null +++ b/doc/requirements.txt @@ -0,0 +1,5 @@ +sphinx!=1.6.6,!=1.6.7,>=1.6.2 # BSD +openstackdocstheme>=1.18.1 # Apache-2.0 +os-api-ref>=1.4.0 # Apache-2.0 +reno>=2.5.0 # Apache-2.0 +mock>=2.0.0 # BSD diff --git a/setup.cfg b/setup.cfg index eaf1f9822..76caaa7d1 100644 --- a/setup.cfg +++ b/setup.cfg @@ -22,15 +22,6 @@ classifier = packages = neutron_lib -[build_sphinx] -source-dir = doc/source -build-dir = doc/build -all_files = 1 -warning-is-error = 1 - -[upload_sphinx] -upload-dir = doc/build/html - [compile_catalog] directory = neutron_lib/locale domain = neutron_lib @@ -44,13 +35,3 @@ input_file = neutron_lib/locale/neutron_lib.pot keywords = _ gettext ngettext l_ lazy_gettext mapping_file = babel.cfg output_file = neutron_lib/locale/neutron_lib.pot - -[pbr] -autodoc_tree_index_modules = True -autodoc_tree_excludes = - setup.py - neutron_lib/tests - # In case neutron_lib.legacy has no actual content, this causes - # an error in sphinx autodoc, so let's exclude it. - neutron_lib/legacy -api_doc_dir = reference/modules diff --git a/test-requirements.txt b/test-requirements.txt index 23ecec28d..2c74585f6 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -8,12 +8,8 @@ coverage!=4.4,>=4.0 # Apache-2.0 fixtures>=3.0.0 # Apache-2.0/BSD flake8-import-order==0.12 # LGPLv3 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 oslotest>=3.2.0 # Apache-2.0 -os-api-ref>=1.4.0 # Apache-2.0 os-testr>=1.0.0 # Apache-2.0 -reno>=2.5.0 # Apache-2.0 testresources>=2.0.0 # Apache-2.0/BSD testscenarios>=0.4 # Apache-2.0/BSD testtools>=2.2.0 # MIT diff --git a/tox.ini b/tox.ini index 6748dfe44..8454aab96 100644 --- a/tox.ini +++ b/tox.ini @@ -22,6 +22,10 @@ commands = {toxinidir}/tools/check_samples.sh [testenv:releasenotes] +deps = + -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} + -r{toxinidir}/requirements.txt + -r{toxinidir}/doc/requirements.txt commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html [testenv:venv] @@ -33,7 +37,11 @@ commands = coverage report [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}/requirements.txt + -r{toxinidir}/doc/requirements.txt +commands = sphinx-build -W -b html doc/source doc/build/html [testenv:api-ref] whitelist_externals = rm