Skip to content

Commit eba3b07

Browse files
committed
added sphinx theme as submodule, added rtd hack to update theme
1 parent 1252ab7 commit eba3b07

File tree

5 files changed

+14
-12
lines changed

5 files changed

+14
-12
lines changed

.gitmodules

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[submodule "docs/_themes"]
2+
path = docs/_themes
3+
url = git://github.com/Pylons/pylons_sphinx_theme.git

docs/.gitignore

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
_themes
21
_build
32

43

docs/Makefile

+4-2
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ help:
2525
clean:
2626
-rm -rf _build/*
2727

28-
html:
28+
html: _themes
2929
mkdir -p _build/html _build/doctrees
3030
$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) _build/html
3131
@echo
@@ -47,7 +47,7 @@ pickle:
4747

4848
web: pickle
4949

50-
htmlhelp:
50+
htmlhelp: _themes
5151
mkdir -p _build/htmlhelp _build/doctrees
5252
$(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) _build/htmlhelp
5353
@echo
@@ -84,3 +84,5 @@ epub:
8484
@echo
8585
@echo "Build finished. The epub file is in _build/epub."
8686

87+
_themes:
88+
git submodule update --init

docs/_themes

Submodule _themes added at f59f7bf

docs/conf.py

+6-9
Original file line numberDiff line numberDiff line change
@@ -132,18 +132,15 @@ def nothing(*arg):
132132
from subprocess import call, Popen, PIPE
133133

134134
p = Popen('which git', shell=True, stdout=PIPE)
135-
git = p.stdout.read().strip()
135+
136136
cwd = os.getcwd()
137137
_themes = os.path.join(cwd, '_themes')
138-
139-
if not os.path.isdir(_themes):
140-
call([git, 'clone', 'git://github.com/Pylons/pylons_sphinx_theme.git',
141-
'_themes'])
138+
p = Popen('which git', shell=True, stdout=PIPE)
139+
git = p.stdout.read().strip()
140+
if not os.listdir(_themes):
141+
call([git, 'submodule', '--init'])
142142
else:
143-
os.chdir(_themes)
144-
call([git, 'checkout', 'master'])
145-
call([git, 'pull'])
146-
os.chdir(cwd)
143+
call([git, 'submodule', 'update'])
147144

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

0 commit comments

Comments
 (0)