set up sphinx build

Change-Id: Id72771e6cf9a8150d19634d36320d30a282eb565
This commit is contained in:
Doug Hellmann
2015-08-19 23:23:05 -07:00
parent bb178b5a2d
commit ae42958f37
5 changed files with 87 additions and 0 deletions

4
.gitignore vendored
View File

@@ -1,2 +1,6 @@
/.tox/
/releases.egg-info/
/.eggs/
/AUTHORS
/ChangeLog
/doc/build/

64
doc/source/conf.py Normal file
View File

@@ -0,0 +1,64 @@
# -*- coding: utf-8 -*-
import os
import sys
sys.path.insert(0, os.path.abspath('../..'))
# -- General configuration ----------------------------------------------------
# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
extensions = ['sphinx.ext.autodoc', 'oslosphinx']
config_generator_config_file = 'config-generator.conf'
# autodoc generation is a bit aggressive and a nuisance when doing heavy
# text edit cycles.
# execute "export SPHINX_DEBUG=1" in your terminal to disable
# Add any paths that contain templates here, relative to this directory.
# templates_path = []
# The suffix of source filenames.
source_suffix = '.rst'
# The master toctree document.
master_doc = 'index'
# General information about the project.
project = u'oslo.config'
copyright = u'2013, OpenStack Foundation'
# If true, '()' will be appended to :func: etc. cross-reference text.
add_function_parentheses = True
# If true, the current module name will be prepended to all description
# unit titles (such as .. function::).
add_module_names = True
# The name of the Pygments (syntax highlighting) style to use.
pygments_style = 'sphinx'
# -- Options for HTML output --------------------------------------------------
# The theme to use for HTML and HTML Help pages. Major themes that come with
# Sphinx are currently 'default' and 'sphinxdoc'.
# html_theme_path = ["."]
# html_theme = '_theme'
html_static_path = ['static']
# Output file base name for HTML help builder.
htmlhelp_basename = '%sdoc' % project
git_cmd = "git log --pretty=format:'%ad, commit %h' --date=local -n1"
html_last_updated_fmt = os.popen(git_cmd).read()
# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title, author, documentclass
# [howto/manual]).
latex_documents = [
('index',
'%s.tex' % project,
'%s Documentation' % project,
'OpenStack Foundation', 'manual'),
]

5
doc/source/index.rst Normal file
View File

@@ -0,0 +1,5 @@
====================
OpenStack Releases
====================
boo!

View File

@@ -24,3 +24,11 @@ packages = openstack_releases
console_scripts =
validate-request = openstack_releases.cmds.validate:main
list-changes = openstack_releases.cmds.list_changes:main
[build_sphinx]
source-dir = doc/source
build-dir = doc/build
all_files = 1
[upload_sphinx]
upload-dir = doc/build/html

View File

@@ -44,6 +44,12 @@ commands = {toxinidir}/tools/build_tag_history.sh {toxinidir}
[testenv:cover]
#commands = python setup.py testr --coverage --testr-args='{posargs}'
[testenv:docs]
commands = python setup.py build_sphinx
deps =
sphinx
oslosphinx
[flake8]
# H803 skipped on purpose per list discussion.
# E123, E125 skipped as they are invalid PEP-8.