Created
November 27, 2011 17:00
-
-
Save blaflamme/1397824 to your computer and use it in GitHub Desktop.
Pyramid documentation sphinx theme update
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Add and use Pylons theme | |
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')) | |
html_theme_path = ['_themes'] | |
html_theme = 'pyramid' | |
html_theme_options = dict( | |
github_url='https://github.com/Pylons/pyramid' | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment