From d0a25788fca2d2ebbf008658401e0d64ae232a8d Mon Sep 17 00:00:00 2001 From: Blaise Laflamme Date: Sun, 27 Nov 2011 12:33:27 -0500 Subject: updated doc theme workflow --- .gitmodules | 3 --- docs/.gitignore | 1 + docs/Makefile | 8 +++----- docs/_themes | 1 - docs/conf.py | 32 ++++++++++++++++++++------------ 5 files changed, 24 insertions(+), 21 deletions(-) delete mode 100644 .gitmodules delete mode 160000 docs/_themes diff --git a/.gitmodules b/.gitmodules deleted file mode 100644 index 45397942b..000000000 --- a/.gitmodules +++ /dev/null @@ -1,3 +0,0 @@ -[submodule "docs/_themes"] - path = docs/_themes - url = git://github.com/Pylons/pylons_sphinx_theme.git diff --git a/docs/.gitignore b/docs/.gitignore index 30d731d4a..da7abd0c0 100644 --- a/docs/.gitignore +++ b/docs/.gitignore @@ -1,3 +1,4 @@ +_themes _build diff --git a/docs/Makefile b/docs/Makefile index 373d549af..bb381fc53 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -23,9 +23,9 @@ help: @echo " linkcheck to check all external links for integrity" clean: - -rm -rf _build/* _themes + -rm -rf _build/* -html: _themes +html: mkdir -p _build/html _build/doctrees $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) _build/html @echo @@ -47,7 +47,7 @@ pickle: web: pickle -htmlhelp: _themes +htmlhelp: mkdir -p _build/htmlhelp _build/doctrees $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) _build/htmlhelp @echo @@ -84,5 +84,3 @@ epub: @echo @echo "Build finished. The epub file is in _build/epub." -_themes: - cd ..; git submodule update --init; cd docs diff --git a/docs/_themes b/docs/_themes deleted file mode 160000 index d0c25c139..000000000 --- a/docs/_themes +++ /dev/null @@ -1 +0,0 @@ -Subproject commit d0c25c1398f7c975db6fc174ef957764242ccb85 diff --git a/docs/conf.py b/docs/conf.py index 4a39f5d64..6443ed17e 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -38,7 +38,6 @@ LaTeXTranslator.visit_inline = nothing LaTeXTranslator.depart_inline = nothing book = os.environ.get('BOOK') -rtd = os.environ.get('READTHEDOCS', None) == 'True' # If your extensions are in another directory, add it here. If the directory # is relative to the documentation root, use os.path.abspath to make it @@ -48,11 +47,6 @@ sys.path.append(os.path.abspath(parent)) wd = os.getcwd() os.chdir(parent) os.system('%s setup.py test -q' % sys.executable) -if rtd: - from subprocess import Popen, PIPE - p = Popen('which git', shell=True, stdout=PIPE) - git = p.stdout.read().strip() - os.system('{0} submodule update --init; {0} submodule foreach git pull origin master;'.format(git)) os.chdir(wd) for item in os.listdir(parent): @@ -147,15 +141,29 @@ if book: # ----------------------- # 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 = { - 'github_url': 'https://github.com/Pylons/pyramid', - 'in_progress': True -} - +html_theme_options = dict( + github_url='https://github.com/Pylons/pyramid_tutorials', + in_progress='true' + ) # The style sheet to use for HTML and HTML Help pages. A file of that name # must exist either in Sphinx' static/ path, or in one of the custom paths # given in html_static_path. -- cgit v1.2.3 From 862a265e9274239ca835745dea8c5bc4b42910f2 Mon Sep 17 00:00:00 2001 From: Blaise Laflamme Date: Sun, 27 Nov 2011 12:41:50 -0500 Subject: fixed github url --- docs/conf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/conf.py b/docs/conf.py index 6443ed17e..b40d3f08d 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -161,7 +161,7 @@ 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_tutorials', + github_url='https://github.com/Pylons/pyramid', in_progress='true' ) # The style sheet to use for HTML and HTML Help pages. A file of that name -- cgit v1.2.3 From 480df1f5227d5beda988431ea7588241338ff54f Mon Sep 17 00:00:00 2001 From: Blaise Laflamme Date: Sun, 27 Nov 2011 12:55:28 -0500 Subject: fixed version number --- docs/conf.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index b40d3f08d..092c1fca3 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -476,7 +476,7 @@ def resig(app, what, name, obj, options, signature, return_annotation): # -- Options for Epub output --------------------------------------------------- # Bibliographic Dublin Core info. -epub_title = 'The Pyramid Web Application Development Framework, Version 1.2' +epub_title = 'The Pyramid Web Application Development Framework, Version 1.3dev' epub_author = 'Chris McDonough' epub_publisher = 'Agendaless Consulting' epub_copyright = '2008-2011' @@ -493,7 +493,7 @@ epub_scheme = 'ISBN' epub_identifier = '0615445675' # A unique identification for the text. -epub_uid = 'The Pyramid Web Application Development Framework, Version 1.2' +epub_uid = 'The Pyramid Web Application Development Framework, Version 1.3dev' # HTML files that should be inserted before the pages created by sphinx. # The format is a list of tuples containing the path and title. -- cgit v1.2.3 From fd685bae73933434b4c4fd0689898407fd4f9058 Mon Sep 17 00:00:00 2001 From: Blaise Laflamme Date: Sun, 27 Nov 2011 13:14:40 -0500 Subject: fixed git ref --- docs/conf.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index 092c1fca3..530703e14 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -149,12 +149,12 @@ 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', + call([git, 'clone', 'git://github.com/Pylons/pylons_sphinx_theme.git', '_themes']) else: os.chdir(_themes) - call(['git', 'checkout', 'master']) - call(['git', 'pull']) + call([git, 'checkout', 'master']) + call([git, 'pull']) os.chdir(cwd) sys.path.append(os.path.abspath('_themes')) -- cgit v1.2.3