Skip to content

Commit

Permalink
doctry
Browse files Browse the repository at this point in the history
  • Loading branch information
heckj committed Jan 20, 2012
1 parent 89c378c commit ffeb0e5
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 7 deletions.
29 changes: 22 additions & 7 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
# All configuration values have a default; values that are commented out
# serve to show the default.

import sys, os
import sys
import os

# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
Expand All @@ -26,10 +27,19 @@
# 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', 'sphinx.ext.intersphinx', 'sphinx.ext.todo', 'sphinx.ext.coverage']
extensions = ['sphinx.ext.autodoc', 'sphinx.ext.todo', 'sphinx.ext.coverage']
extensions = ['sphinx.ext.autodoc',
'sphinx.ext.todo',
# 'sphinx.ect.intersphinx',
'sphinx.ext.coverage']

todo_include_todos = True

# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
templates_path = []
if os.getenv('HUDSON_PUBLISH_DOCS'):
templates_path = ['_ga', '_templates']
else:
templates_path = ['_templates']

# The suffix of source filenames.
source_suffix = '.rst'
Expand Down Expand Up @@ -79,20 +89,21 @@

# If true, sectionauthor and moduleauthor directives will be shown in the
# output. They are ignored by default.
#show_authors = False
show_authors = True

# The name of the Pygments (syntax highlighting) style to use.
pygments_style = 'sphinx'

# A list of ignored prefixes for module index sorting.
#modindex_common_prefix = []
modindex_common_prefix = ['keystone.']


# -- Options for HTML output ---------------------------------------------------

# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
html_theme = 'default'
html_theme_path = ["."]
html_theme = '_theme'

# 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
Expand Down Expand Up @@ -121,7 +132,7 @@
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['_static']
html_static_path = ['_static', 'images']

# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
# using the given strftime format.
Expand Down Expand Up @@ -245,3 +256,7 @@

# Example configuration for intersphinx: refer to the Python standard library.
#intersphinx_mapping = {'http://docs.python.org/': None}
intersphinx_mapping = {'python': ('http://docs.python.org/', None),
'nova': ('http://nova.openstack.org', None),
'swift': ('http://swift.openstack.org', None),
'glance': ('http://glance.openstack.org', None)}
27 changes: 27 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,40 @@
import os
import subprocess

from setuptools import setup, find_packages

# If Sphinx is installed on the box running setup.py,
# enable setup.py to build the documentation, otherwise,
# just ignore it
cmdclass = {}
try:
from sphinx.setup_command import BuildDoc

class local_BuildDoc(BuildDoc):
def run(self):
base_dir = os.path.dirname(os.path.abspath(__file__))
subprocess.Popen(["python", "generate_autodoc_index.py"],
cwd=os.path.join(base_dir, "docs")).communicate()
for builder in ['html', 'man']:
self.builder = builder
self.finalize_options()
BuildDoc.run(self)
cmdclass['build_sphinx'] = local_BuildDoc
except:
# unable to import sphinx, politely skip past...
pass


setup(name='keystone',
version='2012.1',
description="Authentication service for OpenStack",
license='Apache License (2.0)',
author='OpenStack, LLC.',
author_email='[email protected]',
url='http://www.openstack.org',
packages=find_packages(exclude=['test', 'bin']),
scripts=['bin/keystone', 'bin/keystone-manage'],
zip_safe=False,
cmdclass=cmdclass,
install_requires=['setuptools'],
)

0 comments on commit ffeb0e5

Please sign in to comment.