Blaise Laflamme
2012-05-07 d312088ffa8542be7e6ec78030df203bc8339a62
added sphinx theme as submodule, added rtd hack to update theme
2 files added
2 files modified
26 ■■■■ changed files
.gitmodules 3 ●●●●● patch | view | raw | blame | history
docs/Makefile 7 ●●●● patch | view | raw | blame | history
docs/_themes @ f59f7b 1 ●●●● patch | view | raw | blame | history
docs/conf.py 15 ●●●●● patch | view | raw | blame | history
.gitmodules
New file
@@ -0,0 +1,3 @@
[submodule "docs/_themes"]
    path = docs/_themes
    url = git://github.com/Pylons/pylons_sphinx_theme.git
docs/Makefile
@@ -25,7 +25,7 @@
clean:
    -rm -rf _build/*
html:
html: _themes
    mkdir -p _build/html _build/doctrees
    $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) _build/html
    @echo
@@ -47,7 +47,7 @@
web: pickle
htmlhelp:
htmlhelp: _themes
    mkdir -p _build/htmlhelp _build/doctrees
    $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) _build/htmlhelp
    @echo
@@ -84,3 +84,6 @@
    @echo
    @echo "Build finished. The epub file is in _build/epub."
_themes:
    git submodule update --init
docs/_themes
New file
@@ -0,0 +1 @@
Subproject commit f59f7bfce5259f50fbb67b9040c03ecb080130b4
docs/conf.py
@@ -130,19 +130,14 @@
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'])
    p = Popen('which git', shell=True, stdout=PIPE)
    git = p.stdout.read().strip()
    if not os.listdir(_themes):
        call([git, 'submodule', '--init'])
    else:
        os.chdir(_themes)
        call([git, 'checkout', 'master'])
        call([git, 'pull'])
        os.chdir(cwd)
        call([git, 'submodule', 'update'])
    sys.path.append(os.path.abspath('_themes'))