From 60401123121c08fc16a8f8b21bc9b015d37564b7 Mon Sep 17 00:00:00 2001 From: Robert Clark Date: Thu, 3 Sep 2015 12:43:39 -0700 Subject: [PATCH] Changes to allow sphinx to build correctly This should allow our documentation to post to http://docs.openstack.org/developer/anchor Running locally both pass: python setup.py build_sphinx tox -e venv python setup.py build_sphinx "tox -e docs" still works and you can run that if you desire. "tox -e venv python setup.py build_sphinx" is what's required to work by infra so that documentation can be built upstream and published to the developer documentation pages. It also allows the documentation jobs to run in the gate so that documentation is built at review time. Change-Id: If67961a1b68223ed4ca002037cb7e8c6a51fbe3e --- {docs => doc/source}/api.rst | 0 {docs => doc/source}/conf.py | 4 ++-- {docs => doc/source}/configuration.rst | 0 {docs => doc/source}/ephemeralPKI.rst | 0 {docs => doc/source}/index.rst | 0 {docs => doc/source}/signing_backends.rst | 0 {docs => doc/source}/validators.rst | 0 setup.cfg | 5 +++++ test-requirements.txt | 4 ++++ tox.ini | 4 ++-- 10 files changed, 13 insertions(+), 4 deletions(-) rename {docs => doc/source}/api.rst (100%) rename {docs => doc/source}/conf.py (99%) rename {docs => doc/source}/configuration.rst (100%) rename {docs => doc/source}/ephemeralPKI.rst (100%) rename {docs => doc/source}/index.rst (100%) rename {docs => doc/source}/signing_backends.rst (100%) rename {docs => doc/source}/validators.rst (100%) diff --git a/docs/api.rst b/doc/source/api.rst similarity index 100% rename from docs/api.rst rename to doc/source/api.rst diff --git a/docs/conf.py b/doc/source/conf.py similarity index 99% rename from docs/conf.py rename to doc/source/conf.py index a315e94..86417f4 100644 --- a/docs/conf.py +++ b/doc/source/conf.py @@ -98,12 +98,12 @@ pygments_style = 'sphinx' # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. -html_theme = 'alabaster' +#html_theme = 'alabaster' # Theme options are theme-specific and customize the look and feel of a theme # further. For a list of options available for each theme, see the # documentation. -#html_theme_options = {} +html_theme_options = {} # Add any paths that contain custom themes here, relative to this directory. #html_theme_path = [] diff --git a/docs/configuration.rst b/doc/source/configuration.rst similarity index 100% rename from docs/configuration.rst rename to doc/source/configuration.rst diff --git a/docs/ephemeralPKI.rst b/doc/source/ephemeralPKI.rst similarity index 100% rename from docs/ephemeralPKI.rst rename to doc/source/ephemeralPKI.rst diff --git a/docs/index.rst b/doc/source/index.rst similarity index 100% rename from docs/index.rst rename to doc/source/index.rst diff --git a/docs/signing_backends.rst b/doc/source/signing_backends.rst similarity index 100% rename from docs/signing_backends.rst rename to doc/source/signing_backends.rst diff --git a/docs/validators.rst b/doc/source/validators.rst similarity index 100% rename from docs/validators.rst rename to doc/source/validators.rst diff --git a/setup.cfg b/setup.cfg index 32dfb7a..9662eba 100644 --- a/setup.cfg +++ b/setup.cfg @@ -21,6 +21,11 @@ classifier = Programming Language :: Python :: 3.4 Topic :: Security +[build_sphinx] +all_files = 1 +build-dir = doc/build +source-dir = doc/source + [entry_points] anchor.signing_backends = anchor = anchor.certificate_ops:sign diff --git a/test-requirements.txt b/test-requirements.txt index d8f7642..f57067b 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -11,3 +11,7 @@ testrepository>=0.0.18 testscenarios>=0.4 testtools>=1.4.0 requests-mock>=0.6.0 # Apache-2.0 + +# Documentation build requirements +sphinx!=1.2.0,!=1.3b1,<1.3,>=1.1.2 +oslosphinx>=2.5.0 # Apache-2.0 diff --git a/tox.ini b/tox.ini index e063d66..8fbcf2c 100644 --- a/tox.ini +++ b/tox.ini @@ -20,8 +20,8 @@ deps = doc8 sphinx commands = - sphinx-build -W -b html -d {envtmpdir}/doctrees docs docs/_build/html - doc8 --allow-long-titles docs/ --ignore-path docs/_build/ + sphinx-build -W -b html -d {envtmpdir}/doctrees doc/source doc/_build/html + doc8 --allow-long-titles doc/source --ignore-path doc/_build/ [testenv:pep8] commands =