From aacc95087f58e425aa8fbb5f3a3d6ad4329fe3f8 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Sun, 4 Aug 2019 16:42:38 +0200 Subject: [PATCH] Use "modern" way of building docs We don't use python build_sphinx anymore, replace with sphinx-build according to PTI. Remove related configuration from setup.cfg. This repo builds only docs, so no need for a separate doc/requirements.txt file, remove its usage. Cleanup requirements files, we need only requirements for building docs. Update conf.py for newer openstackdocstheme. Change-Id: I3f37375b77aaf2f652a69d396a2bc22fb7a7ee40 --- doc/source/conf.py | 16 ++-------------- requirements.txt | 3 ++- setup.cfg | 6 ------ test-requirements.txt | 13 ++----------- tox.ini | 3 +-- 5 files changed, 7 insertions(+), 34 deletions(-) diff --git a/doc/source/conf.py b/doc/source/conf.py index 026829c0..a9b5e95f 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -56,9 +56,9 @@ bug_tracker_url = u'https://launchpad.net/tripleo' # built documents. # # The short X.Y version. -version = '3.0.0' +# version = '3.0.0' # The full version, including alpha/beta/rc tags. -release = '3.0.0' +# release = '3.0.0' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. @@ -111,18 +111,6 @@ html_theme = 'openstackdocs' # -- Options for LaTeX output ------------------------------------------------ -latex_elements = { - # The paper size ('letterpaper' or 'a4paper'). - # 'papersize': 'letterpaper', - - # The font size ('10pt', '11pt' or '12pt'). - # 'pointsize': '10pt', - - # Additional stuff for the LaTeX preamble. - # 'preamble': '', - } - - def _get_name_version(index=1): response = requests.get('https://releases.openstack.org/') release_list = PyQuery(response.content) diff --git a/requirements.txt b/requirements.txt index 664f562b..b2113829 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,5 @@ # 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.5.0 # Apache-2.0 + +openstackdocstheme>=1.20.0 # Apache-2.0 diff --git a/setup.cfg b/setup.cfg index 90e541ee..adbf03d8 100644 --- a/setup.cfg +++ b/setup.cfg @@ -18,12 +18,6 @@ classifier = Programming Language :: Python :: 3 Programming Language :: Python :: 3.3 -[build_sphinx] -all_files = 1 -build-dir = doc/build -source-dir = doc/source -warning-is-error = 1 - [egg_info] tag_build = tag_date = 0 diff --git a/test-requirements.txt b/test-requirements.txt index 607696d0..51d68162 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -4,16 +4,7 @@ # Doc requirements 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,>=1.6.2;python_version>='3.4' # BSD -sphinx_rtd_theme==0.1.7 sphinxcontrib-mermaid -hacking<1.2.0,>=1.1.0 - -fixtures>=3.0.0 # Apache-2.0/BSD -python-subunit>=0.0.18 # Apache-2.0/BSD -testrepository>=0.0.18 # Apache-2.0/BSD -testscenarios>=0.4 # Apache-2.0/BSD -testtools>=1.4.0 # MIT -mock>=2.0 # BSD -oslotest>=1.10.0 # Apache-2.0 -bashate>=0.2 # Apache-2.0 +requests +pyquery diff --git a/tox.ini b/tox.ini index 073f0887..e4da7a48 100644 --- a/tox.ini +++ b/tox.ini @@ -17,8 +17,7 @@ commands = {posargs} [testenv:docs] basepython = python3 commands = - pip install -r {toxinidir}/doc/requirements.txt - python setup.py build_sphinx + sphinx-build -a -E -W -d doc/build/doctrees -b html doc/source doc/build/html [testenv:pep8] basepython = python3