From 0ec3ce3d31e28f3d0a38d4ba30fcc1eeb49ca73b Mon Sep 17 00:00:00 2001 From: David Stanek Date: Thu, 30 Jul 2015 14:26:23 +0000 Subject: [PATCH] Uses tox for automating documentation builds Change-Id: I8012889aa6938378b5e5e85fb443cf13be460d61 Closes-Bug: #1469870 --- .gitignore | 5 +++++ dev-requirements.txt | 4 ++-- doc/source/conf.py | 2 +- setup.cfg | 24 ++++++++++++++++++++++++ setup.py | 22 ++++++++++++++++++++++ tox.ini | 14 ++++++++++++++ 6 files changed, 68 insertions(+), 3 deletions(-) create mode 100644 setup.cfg create mode 100644 setup.py create mode 100644 tox.ini diff --git a/.gitignore b/.gitignore index 94f69cffe6..7c3a568611 100644 --- a/.gitignore +++ b/.gitignore @@ -48,8 +48,13 @@ docs/build/ Icon? ehthumbs.db Thumbs.db +.eggs # User driven backup files # ############################ *.bak +# Generated by pbr while building docs +###################################### +AUTHORS +ChangeLog diff --git a/dev-requirements.txt b/dev-requirements.txt index b25483c46e..6671444972 100644 --- a/dev-requirements.txt +++ b/dev-requirements.txt @@ -4,5 +4,5 @@ hacking>=0.10.0,<0.11 pep8==1.5.7 pyflakes==0.8.1 mccabe==0.2.1 # capped for flake8 -Sphinx==1.3.1 -oslosphinx>=3.0.0 # added for doc template +sphinx!=1.2.0,!=1.3b1,<1.3,>=1.1.2 +oslosphinx>=2.5.0 # Apache-2.0 diff --git a/doc/source/conf.py b/doc/source/conf.py index c486cbb51b..65928ba998 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -108,7 +108,7 @@ todo_include_todos = False # 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 diff --git a/setup.cfg b/setup.cfg new file mode 100644 index 0000000000..4056124bf3 --- /dev/null +++ b/setup.cfg @@ -0,0 +1,24 @@ +[metadata] +name = os-ansible-deployment +summary = Ansible playbooks for deploying OpenStack +description-file = + README.rst +author = OpenStack +author-email = openstack-dev@lists.openstack.org +home-page = http://www.openstack.org/ +classifier = + Intended Audience :: Developers + Intended Audience :: System Administrators + License :: OSI Approved :: Apache Software License + Operating System :: POSIX :: Linux + +[build_sphinx] +all_files = 1 +build-dir = doc/build +source-dir = doc/source + +[pbr] +warnerrors = True + +[wheel] +universal = 1 diff --git a/setup.py b/setup.py new file mode 100644 index 0000000000..70c2b3f32b --- /dev/null +++ b/setup.py @@ -0,0 +1,22 @@ +#!/usr/bin/env python +# Copyright (c) 2013 Hewlett-Packard Development Company, L.P. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or +# implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# THIS FILE IS MANAGED BY THE GLOBAL REQUIREMENTS REPO - DO NOT EDIT +import setuptools + +setuptools.setup( + setup_requires=['pbr'], + pbr=True) diff --git a/tox.ini b/tox.ini new file mode 100644 index 0000000000..b626f6b11d --- /dev/null +++ b/tox.ini @@ -0,0 +1,14 @@ +[tox] +minversion = 1.6 +skipsdist = True +envlist = docs + +[testenv] +usedevelop = True +install_command = pip install -U {opts} {packages} +setenv = VIRTUAL_ENV={envdir} + +[testenv:docs] +deps = -r{toxinidir}/dev-requirements.txt +commands= + python setup.py build_sphinx