From 173b11cb50e115fe12baa097a05db36f24f2e181 Mon Sep 17 00:00:00 2001 From: junboli Date: Mon, 15 Jan 2018 11:25:35 +0800 Subject: [PATCH] Follow the new PTI for document build For compliance with the Project Testing Interface as described in [1]: [1] https://governance.openstack.org/tc/reference/project-testing-interface.html For more detials information, please refer to [2]: [2] http://lists.openstack.org/pipermail/openstack-dev/2017-December/125710.html Change-Id: I648a78396a2e27f1d7197e89cddba73f8aa858aa --- doc/requirements.txt | 6 ++++++ test-requirements.txt | 4 ---- tox.ini | 19 +++++++++++++++---- 3 files changed, 21 insertions(+), 8 deletions(-) create mode 100644 doc/requirements.txt diff --git a/doc/requirements.txt b/doc/requirements.txt new file mode 100644 index 0000000000..b666029aef --- /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. +openstackdocstheme>=1.17.0 # Apache-2.0 +reno>=2.5.0 # Apache-2.0 +sphinx>=1.6.2 # BSD diff --git a/test-requirements.txt b/test-requirements.txt index 37644d0c91..1a7f1a0f85 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -2,10 +2,6 @@ # of appearance. Changing the order has an impact on the overall integration # process, which may cause wedges in the gate later. hacking!=0.13.0,<0.14,>=0.12.0 # Apache-2.0 -# needed for doc build -sphinx>=1.6.2 # BSD -openstackdocstheme>=1.17.0 # Apache-2.0 -reno>=2.5.0 # Apache-2.0 mock>=2.0.0 # BSD coverage!=4.4,>=4.0 # Apache-2.0 oslotest>=1.10.0 # Apache-2.0 diff --git a/tox.ini b/tox.ini index e7ea1e2b7a..c0df8a6308 100644 --- a/tox.ini +++ b/tox.ini @@ -133,9 +133,14 @@ deps = {[tempestenv]deps} commands = {posargs} [testenv:docs] +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 = - rm -rf doc/build - python setup.py build_sphinx {posargs} + rm -rf doc/build + sphinx-build -b html doc/source doc/build/html +whitelist_externals = rm [testenv:pep8] commands = @@ -161,9 +166,15 @@ enable-extensions = H106,H203,H904 import-order-style = pep8 [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 = - rm -rf releasenotes/build - sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html + rm -rf releasenotes/build + sphinx-build -a -E -W -d releasenotes/build/doctrees \ + -b html releasenotes/source releasenotes/build/html +whitelist_externals = rm [testenv:pip-check-reqs] # Do not install test-requirements as that will pollute the virtualenv for