diff --git a/doc/requirements.txt b/doc/requirements.txt new file mode 100644 index 0000000..ba4505b --- /dev/null +++ b/doc/requirements.txt @@ -0,0 +1,9 @@ +# 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. + +# For generating sphinx documentation +doc8>=0.6.0 # Apache-2.0 +sphinx!=1.6.6,!=1.6.7,>=1.6.2,<2.0.0;python_version=='2.7' # BSD +sphinx!=1.6.6,!=1.6.7,!=2.1.0,>=1.6.2;python_version>='3.4' # BSD +openstackdocstheme>=1.18.1 # Apache-2.0 diff --git a/test-requirements.txt b/test-requirements.txt index 004fe0c..2abdcdb 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -4,11 +4,7 @@ hacking<0.11,>=0.10.0 -doc8>=0.6.0 # Apache-2.0 coverage!=4.4,>=4.0 # Apache-2.0 -sphinx!=1.6.6,!=1.6.7,>=1.6.2,<2.0.0;python_version=='2.7' # BSD -sphinx!=1.6.6,!=1.6.7,!=2.1.0,>=1.6.2;python_version>='3.4' # BSD -openstackdocstheme>=1.18.1 # Apache-2.0 oslotest>=3.2.0 # Apache-2.0 stestr>=2.0.0 # Apache-2.0 testtools>=2.2.0 # MIT diff --git a/tox.ini b/tox.ini index 74699d4..fc4d5d4 100644 --- a/tox.ini +++ b/tox.ini @@ -2,10 +2,6 @@ minversion = 2.0 envlist = py27,py37,docs,pep8 -[testenv:docs] -basepython = python3 -commands = python setup.py build_sphinx - [testenv] install_command = pip install {opts} {packages} deps = @@ -22,8 +18,6 @@ commands = flake8 {posargs} basepython = python2.7 commands = {[testenv]commands} - sphinx-build -b doctest doc/source doc/build - doc8 --ignore-path "doc/source/history.rst" doc/source [testenv:venv] basepython = python3 @@ -37,8 +31,19 @@ exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build basepython = python3 commands = python setup.py test --coverage --testr-args="{posargs}" +[testenv:docs] +basepython = python3 +deps = + -c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master} + -r{toxinidir}/doc/requirements.txt +commands = + doc8 --ignore-path "doc/source/history.rst" doc/source + sphinx-build -W doc/source doc/build + + [testenv:releasenotes] basepython = python3 +deps = {[testenv:docs]deps} commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html [testenv:bindep]