From 71d66b84dbd2927e79ebf2512a4bd287b7664b84 Mon Sep 17 00:00:00 2001 From: Steve Piercy Date: Thu, 16 Apr 2015 16:47:23 -0400 Subject: Replace git submodule crap with new pylons-sphinx-themes package goodness. See #1614. --- docs/conf.py | 22 ++-------------------- 1 file changed, 2 insertions(+), 20 deletions(-) (limited to 'docs') diff --git a/docs/conf.py b/docs/conf.py index fa4578275..11e42c5f3 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -20,6 +20,7 @@ import warnings warnings.simplefilter('ignore', DeprecationWarning) import pkg_resources +import pylons_sphinx_themes # skip raw nodes from sphinx.writers.text import TextTranslator @@ -136,27 +137,8 @@ if book: # Options for HTML output # ----------------------- -# Add and use Pylons theme -if 'sphinx-build' in ' '.join(sys.argv): # protect against dumb importers - from subprocess import call, Popen, PIPE - cwd = os.getcwd() - p = Popen('which git', shell=True, stdout=PIPE) - here = os.path.abspath(os.path.dirname(__file__)) - parent = os.path.abspath(os.path.dirname(here)) - _themes = os.path.join(here, '_themes') - git = p.stdout.read().strip() - try: - os.chdir(parent) - if not os.listdir(_themes): - call([git, 'submodule', '--init']) - else: - call([git, 'submodule', 'update']) - sys.path.append(_themes) - finally: - os.chdir(cwd) - -html_theme_path = ['_themes'] html_theme = 'pyramid' +html_theme_path = pylons_sphinx_themes.get_html_themes_path() html_theme_options = dict( github_url='https://github.com/Pylons/pyramid', in_progress='true', -- cgit v1.2.3 From cc443a4678298188d4b0a178540118ef3b123291 Mon Sep 17 00:00:00 2001 From: Steve Piercy Date: Thu, 16 Apr 2015 17:25:23 -0400 Subject: - update sphinx makefile - git submodule deinit . - replace git submodule with new pylons-sphinx-themes package. See #1614, #1596 --- docs/Makefile | 6 ++---- docs/_themes | 1 - 2 files changed, 2 insertions(+), 5 deletions(-) delete mode 160000 docs/_themes (limited to 'docs') diff --git a/docs/Makefile b/docs/Makefile index 12dc88bf8..2f83fbe06 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -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 @@ -47,7 +47,7 @@ pickle: web: pickle -htmlhelp: themes +htmlhelp: mkdir -p _build/htmlhelp _build/doctrees $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) _build/htmlhelp @echo @@ -89,5 +89,3 @@ epub: @echo @echo "Build finished. The epub file is in _build/epub." -themes: - cd ..; git submodule update --init --recursive; cd docs; diff --git a/docs/_themes b/docs/_themes deleted file mode 160000 index 382cba80f..000000000 --- a/docs/_themes +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 382cba80fbd6a7424818d17ec63ca520e485f108 -- cgit v1.2.3 From 4d8580c92b1c4ed45e954f79fcbe1dc018ee700b Mon Sep 17 00:00:00 2001 From: Michael Merickel Date: Sun, 19 Apr 2015 16:14:17 -0500 Subject: add epub to docs and specify a env-specific build dir for docs --- docs/Makefile | 63 ++++++++++++++++++++++++++++++----------------------------- 1 file changed, 32 insertions(+), 31 deletions(-) (limited to 'docs') diff --git a/docs/Makefile b/docs/Makefile index 2f83fbe06..546deb30a 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -5,11 +5,12 @@ SPHINXOPTS = -W SPHINXBUILD = sphinx-build PAPER = +BUILDDIR = _build # Internal variables. PAPEROPT_a4 = -D latex_paper_size=a4 PAPEROPT_letter = -D latex_paper_size=letter -ALLSPHINXOPTS = -d _build/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . +ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . .PHONY: help clean html web pickle htmlhelp latex changes linkcheck @@ -23,69 +24,69 @@ help: @echo " linkcheck to check all external links for integrity" clean: - -rm -rf _build/* + -rm -rf $(BUILDDIR)/* html: - mkdir -p _build/html _build/doctrees - $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) _build/html + mkdir -p $(BUILDDIR)/html $(BUILDDIR)/doctrees + $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html @echo - @echo "Build finished. The HTML pages are in _build/html." + @echo "Build finished. The HTML pages are in $(BUILDDIR)/html." text: - mkdir -p _build/text _build/doctrees - $(SPHINXBUILD) -b text $(ALLSPHINXOPTS) _build/text + mkdir -p $(BUILDDIR)/text $(BUILDDIR)/doctrees + $(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text @echo - @echo "Build finished. The HTML pages are in _build/text." + @echo "Build finished. The HTML pages are in $(BUILDDIR)/text." pickle: - mkdir -p _build/pickle _build/doctrees - $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) _build/pickle + mkdir -p $(BUILDDIR)/pickle $(BUILDDIR)/doctrees + $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle @echo @echo "Build finished; now you can process the pickle files or run" - @echo " sphinx-web _build/pickle" + @echo " sphinx-web $(BUILDDIR)/pickle" @echo "to start the sphinx-web server." web: pickle htmlhelp: - mkdir -p _build/htmlhelp _build/doctrees - $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) _build/htmlhelp + mkdir -p $(BUILDDIR)/htmlhelp $(BUILDDIR)/doctrees + $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp @echo @echo "Build finished; now you can run HTML Help Workshop with the" \ - ".hhp project file in _build/htmlhelp." + ".hhp project file in $(BUILDDIR)/htmlhelp." latex: - mkdir -p _build/latex _build/doctrees - $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) _build/latex - cp _static/*.png _build/latex + mkdir -p $(BUILDDIR)/latex $(BUILDDIR)/doctrees + $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex + cp _static/*.png $(BUILDDIR)/latex ./convert_images.sh - cp _static/latex-warning.png _build/latex - cp _static/latex-note.png _build/latex + cp _static/latex-warning.png $(BUILDDIR)/latex + cp _static/latex-note.png $(BUILDDIR)/latex @echo - @echo "Build finished; the LaTeX files are in _build/latex." + @echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex." @echo "Run \`make latexpdf' to build a PDF file from them." latexpdf: - $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) _build/latex + $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex @echo "Running LaTeX files through pdflatex..." - $(MAKE) -C _build/latex all-pdf - @echo "pdflatex finished; the PDF file is in _build/latex." + $(MAKE) -C $(BUILDDIR)/latex all-pdf + @echo "pdflatex finished; the PDF file is in $(BUILDDIR)/latex." changes: - mkdir -p _build/changes _build/doctrees - $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) _build/changes + mkdir -p $(BUILDDIR)/changes $(BUILDDIR)/doctrees + $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes @echo - @echo "The overview file is in _build/changes." + @echo "The overview file is in $(BUILDDIR)/changes." linkcheck: - mkdir -p _build/linkcheck _build/doctrees - $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) _build/linkcheck + mkdir -p $(BUILDDIR)/linkcheck $(BUILDDIR)/doctrees + $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck @echo @echo "Link check complete; look for any errors in the above output " \ - "or in _build/linkcheck/output.txt." + "or in $(BUILDDIR)/linkcheck/output.txt." epub: - $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) _build/epub + $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub @echo - @echo "Build finished. The epub file is in _build/epub." + @echo "Build finished. The epub file is in $(BUILDDIR)/epub." -- cgit v1.2.3