Skip to content
Browse files

added sphinx theme as submodule, added rtd hack to update theme

  • Loading branch information...
1 parent 8782def commit b1bdd27166bd4614ed6c59c55ba64295951b31c8 @blaflamme blaflamme committed May 6, 2012
Showing with 13 additions and 13 deletions.
  1. +3 −0 .gitmodules
  2. +0 −1 docs/.gitignore
  3. +4 −2 docs/Makefile
  4. +1 −0 docs/_themes
  5. +5 −10 docs/conf.py
View
3 .gitmodules
@@ -0,0 +1,3 @@
+[submodule "docs/_themes"]
+ path = docs/_themes
+ url = git://github.com/Pylons/pylons_sphinx_theme.git
View
1 docs/.gitignore
@@ -1,4 +1,3 @@
-_themes
_build
View
6 docs/Makefile
@@ -25,7 +25,7 @@ help:
clean:
-rm -rf _build/*
-html:
+html: _themes
mkdir -p _build/html _build/doctrees
$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) _build/html
@echo
@@ -47,7 +47,7 @@ pickle:
web: pickle
-htmlhelp:
+htmlhelp: _themes
mkdir -p _build/htmlhelp _build/doctrees
$(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) _build/htmlhelp
@echo
@@ -84,3 +84,5 @@ epub:
@echo
@echo "Build finished. The epub file is in _build/epub."
+_themes:
+ git submodule update --init
1 docs/_themes
@@ -0,0 +1 @@
+Subproject commit f59f7bfce5259f50fbb67b9040c03ecb080130b4
View
15 docs/conf.py
@@ -131,19 +131,14 @@ def nothing(*arg):
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'))

0 comments on commit b1bdd27

Please sign in to comment.
Something went wrong with that request. Please try again.