From eba3b0763cf4fa3aa4b099adb2e10c53c6d99e74 Mon Sep 17 00:00:00 2001 From: Blaise Laflamme Date: Sun, 6 May 2012 19:56:21 -0400 Subject: added sphinx theme as submodule, added rtd hack to update theme --- docs/.gitignore | 1 - docs/Makefile | 6 ++++-- docs/_themes | 1 + docs/conf.py | 15 ++++++--------- 4 files changed, 11 insertions(+), 12 deletions(-) create mode 160000 docs/_themes (limited to 'docs') diff --git a/docs/.gitignore b/docs/.gitignore index da7abd0c0..30d731d4a 100644 --- a/docs/.gitignore +++ b/docs/.gitignore @@ -1,4 +1,3 @@ -_themes _build diff --git a/docs/Makefile b/docs/Makefile index bb381fc53..e4a325022 100644 --- a/docs/Makefile +++ b/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 diff --git a/docs/_themes b/docs/_themes new file mode 160000 index 000000000..f59f7bfce --- /dev/null +++ b/docs/_themes @@ -0,0 +1 @@ +Subproject commit f59f7bfce5259f50fbb67b9040c03ecb080130b4 diff --git a/docs/conf.py b/docs/conf.py index db972261d..fc3d184ed 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -132,18 +132,15 @@ 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')) -- cgit v1.2.3