Permalink
Browse files

Merge pull request #10 from ppaez/nosubmodules

Fix make html
  • Loading branch information...
2 parents 03cdf23 + 724ce3a commit 58a89efe1aa3256fb7c763212589525c9a750a01 @mcdonc mcdonc committed Mar 24, 2012
Showing with 40 additions and 19 deletions.
  1. +2 −0 CONTRIBUTORS.txt
  2. +1 −1 docs/.gitignore
  3. +2 −5 docs/Makefile
  4. +0 −1 docs/_themes
  5. +35 −12 docs/conf.py
View
@@ -121,3 +121,5 @@ Contributors
- Blaise Laflamme, 2011/10/22
- Michael Merickel, 2011/11/13
+
+- Patricio Paez, 2012/03/24
View
@@ -1,2 +1,2 @@
-.build/
+_themes/
_build/
View
@@ -25,7 +25,7 @@ help:
clean:
-rm -rf _build/*
-html: _themes
+html:
mkdir -p _build/html _build/doctrees
$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) _build/html
@echo
@@ -41,7 +41,7 @@ pickle:
web: pickle
-htmlhelp: _themes/
+htmlhelp:
mkdir -p _build/htmlhelp _build/doctrees
$(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) _build/htmlhelp
@echo
@@ -68,6 +68,3 @@ linkcheck:
@echo
@echo "Link check complete; look for any errors in the above output " \
"or in _build/linkcheck/output.txt."
-
-_themes:
- cd ..; git submodule update --init; cd docs
Submodule _themes deleted from 679254
View
@@ -17,18 +17,39 @@
# make it absolute, like shown here.
#sys.path.append(os.path.abspath('some/directory'))
-import sys, os
+import sys
+import os
-parent = os.path.dirname(os.path.dirname(__file__))
-sys.path.append(os.path.abspath(parent))
-wd = os.getcwd()
-os.chdir(parent)
-os.system('%s setup.py test -q' % sys.executable)
-os.chdir(wd)
-
-for item in os.listdir(parent):
- if item.endswith('.egg'):
- sys.path.append(os.path.join(parent, item))
+# 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)
+ os.system('%s setup.py test -q' % sys.executable)
+ os.chdir(wd)
+
+ for item in os.listdir(parent):
+ if item.endswith('.egg'):
+ sys.path.append(os.path.join(parent, item))
# General configuration
# ---------------------
@@ -71,6 +92,8 @@
# searched for source files.
#exclude_dirs = []
+exclude_patterns = ['_themes/README.rst',]
+
# The reST default role (used for this markup: `text`) to use for all
# documents.
#default_role = None
@@ -125,7 +148,7 @@
# here, relative to this directory. They are copied after the builtin
# static files, so a file named "default.css" will overwrite the builtin
# "default.css".
-html_static_path = ['_static']
+#html_static_path = ['_static']
# If not '', a 'Last updated on:' timestamp is inserted at every page
# bottom, using the given strftime format.

0 comments on commit 58a89ef

Please sign in to comment.