Skip to content

Commit

Permalink
Merge branch 'master' into aodag-py3k
Browse files Browse the repository at this point in the history
  • Loading branch information
mcdonc committed Feb 4, 2012
2 parents aa2b6cb + 5a66415 commit 1dc1a1a
Show file tree
Hide file tree
Showing 5 changed files with 53 additions and 23 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Expand Up @@ -19,3 +19,5 @@ pypyenv/
build/
dist/
peppercorn/coverage.xml
docs/_build
docs/_themes
3 changes: 0 additions & 3 deletions .gitmodules

This file was deleted.

8 changes: 3 additions & 5 deletions docs/Makefile
Expand Up @@ -2,7 +2,7 @@
#

# You can set these variables from the command line.
SPHINXOPTS =
SPHINXOPTS = -W
SPHINXBUILD = sphinx-build
PAPER =

Expand All @@ -25,7 +25,7 @@ help:
clean:
-rm -rf _build/*

html: _themes
html:
mkdir -p _build/html _build/doctrees
$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) _build/html
@echo
Expand All @@ -47,7 +47,7 @@ pickle:

web: pickle

htmlhelp: _themes
htmlhelp:
mkdir -p _build/htmlhelp _build/doctrees
$(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) _build/htmlhelp
@echo
Expand Down Expand Up @@ -84,5 +84,3 @@ epub:
@echo
@echo "Build finished. The epub file is in _build/epub."

_themes:
cd ..; git submodule update --init; cd docs
1 change: 0 additions & 1 deletion docs/_themes
Submodule _themes deleted from 03e5e5
62 changes: 48 additions & 14 deletions docs/conf.py
Expand Up @@ -14,22 +14,57 @@

import sys, os

# Add and use Pylons theme
if 'sphinx-build' in ' '.join(sys.argv): # protect against dumb importers
from subprocess import call, Popen, PIPE

p = Popen('which git', shell=True, stdout=PIPE)
git = p.stdout.read().strip()
cwd = os.getcwd()
_themes = os.path.join(cwd, '_themes')

if not os.path.isdir(_themes):
call([git, 'clone', 'git://github.com/Pylons/pylons_sphinx_theme.git',
'_themes'])
else:
os.chdir(_themes)
call([git, 'checkout', 'master'])
call([git, 'pull'])
os.chdir(cwd)

sys.path.append(os.path.abspath('_themes'))

parent = os.path.dirname(os.path.dirname(__file__))
sys.path.append(os.path.abspath(parent))
wd = os.getcwd()
os.chdir(parent)
os.system('%s setup.py test -q' % sys.executable)
os.chdir(wd)

parent = os.path.dirname(os.path.dirname(__file__))
sys.path.append(os.path.abspath(parent))
wd = os.getcwd()
os.chdir(parent)
os.system('%s setup.py test -q' % sys.executable)
os.chdir(wd)

for item in os.listdir(parent):
if item.endswith('.egg'):
sys.path.append(os.path.join(parent, item))

html_theme_path = ['_themes']
html_theme = 'pylons'
html_theme_options = dict(
github_url='https://github.com/Pylons/peppercorn',
# in_progress='true'
)


# If your extensions are in another directory, add it here. If the
# directory is relative to the documentation root, use os.path.abspath to
# make it absolute, like shown here.
#sys.path.append(os.path.abspath('some/directory'))

parent = os.path.dirname(os.path.dirname(__file__))
sys.path.append(os.path.abspath(parent))
wd = os.getcwd()
os.chdir(parent)
os.system('%s setup.py test -q' % sys.executable)
os.chdir(wd)

for item in os.listdir(parent):
if item.endswith('.egg'):
sys.path.append(os.path.join(parent, item))

# General configuration
# ---------------------

Expand Down Expand Up @@ -71,6 +106,8 @@
# searched for source files.
#exclude_dirs = []

exclude_patterns = ['_themes/README.rst',]

# The reST default role (used for this markup: `text`) to use for all
# documents.
#default_role = None
Expand All @@ -93,9 +130,6 @@
# Options for HTML output
# -----------------------

sys.path.append(os.path.abspath('_themes'))
html_theme_path = ['_themes']
html_theme = 'pylons'

# The style sheet to use for HTML and HTML Help pages. A file of that name
# must exist either in Sphinx' static/ path, or in one of the custom paths
Expand Down

0 comments on commit 1dc1a1a

Please sign in to comment.