Commit 35fdaca7 authored by Tres Seaver's avatar Tres Seaver

Get Pylons theme working in Sphinx build.

parent d7165154
Subproject commit 03e5e5aaaeddc4c9aea887478c7e7b379a127b6f
Subproject commit de1ebd27d5a699e60e13947f479266e70020dd79
......@@ -92,6 +92,32 @@ today_fmt = '%B %d, %Y'
# The name of the Pygments (syntax highlighting) style to use.
pygments_style = 'sphinx'
# 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)
sys.path.append(parent)
# Options for HTML output
# -----------------------
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment