Skip to content

Commit 7173ed0

Browse files
committed
shift output directory for html build so the sdist package looks nicer
1 parent d383c7a commit 7173ed0

File tree

3 files changed

+65
-59
lines changed

3 files changed

+65
-59
lines changed

.hgignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ dist
66
distribute*.egg
77
distribute*.tar.gz
88
docs/build
9+
docs/html
910
docs/website
1011
tests/catch_output
1112
tests/testpackage/build

Makefile

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ SUPPORTED_SHELLS=bash sh ksh zsh
1616
help:
1717
@echo "sdist - Source distribution"
1818
@echo "html - HTML documentation"
19+
@echo "docclean - Remove documentation build files"
1920
@echo "register - register a new release on PyPI"
2021
@echo "website - build web version of docs"
2122
@echo "installwebsite - deploy web version of docs"
@@ -33,15 +34,19 @@ sdist: html
3334
# Documentation
3435
.PHONY: html
3536
html:
36-
(cd docs && $(MAKE) html SPHINXOPTS="-c sphinx/pkg")
37+
(cd docs && $(MAKE) html SPHINXOPTS="-c sphinx/pkg" LANGUAGE="en")
3738
(cd docs && $(MAKE) html SPHINXOPTS="-c sphinx/pkg" LANGUAGE="es")
3839

40+
.PHONY: docclean
41+
docclean:
42+
rm -rf docs/build docs/html
43+
3944
# Website copy of documentation
4045
.PHONY: website
4146
website:
4247
[ ~/Devel/doughellmann/doughellmann/templates/base.html -nt docs/sphinx/web/templates/base.html ] && (echo "Updating base.html" ; cp ~/Devel/doughellmann/doughellmann/templates/base.html docs/sphinx/web/templates/base.html) || exit 0
4348
rm -rf docs/website
44-
(cd docs && $(MAKE) html SPHINXOPTS="-c sphinx/web" BUILDDIR="website/en")
49+
(cd docs && $(MAKE) html SPHINXOPTS="-c sphinx/web" BUILDDIR="website/en" LANGUAGE="en")
4550
(cd docs && $(MAKE) html SPHINXOPTS="-c sphinx/web" BUILDDIR="website/es" LANGUAGE="es")
4651

4752
installwebsite: website

docs/Makefile

Lines changed: 57 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@ LANGUAGE = en
88
SPHINXOPTS =
99
SPHINXBUILD = sphinx-build
1010
PAPER =
11-
BUILDDIR = build/$(LANGUAGE)
11+
BUILDDIR = html/$(LANGUAGE)
1212

1313
# Internal variables.
1414
PAPEROPT_a4 = -D latex_paper_size=a4
1515
PAPEROPT_letter = -D latex_paper_size=letter
16-
ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) $(LANGUAGE)
16+
ALLSPHINXOPTS = -d build/$(LANGUAGE)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) $(LANGUAGE)
1717

1818
.PHONY: help clean html dirhtml pickle json htmlhelp qthelp latex changes linkcheck doctest
1919

@@ -34,59 +34,59 @@ clean:
3434
-rm -rf $(BUILDDIR)/*
3535

3636
html:
37-
$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
37+
$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)
3838
@echo
39-
@echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
40-
41-
dirhtml:
42-
$(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml
43-
@echo
44-
@echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml."
45-
46-
pickle:
47-
$(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle
48-
@echo
49-
@echo "Build finished; now you can process the pickle files."
50-
51-
json:
52-
$(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json
53-
@echo
54-
@echo "Build finished; now you can process the JSON files."
55-
56-
htmlhelp:
57-
$(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp
58-
@echo
59-
@echo "Build finished; now you can run HTML Help Workshop with the" \
60-
".hhp project file in $(BUILDDIR)/htmlhelp."
61-
62-
qthelp:
63-
$(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp
64-
@echo
65-
@echo "Build finished; now you can run "qcollectiongenerator" with the" \
66-
".qhcp project file in $(BUILDDIR)/qthelp, like this:"
67-
@echo "# qcollectiongenerator $(BUILDDIR)/qthelp/virtualenvwrapper.qhcp"
68-
@echo "To view the help file:"
69-
@echo "# assistant -collectionFile $(BUILDDIR)/qthelp/virtualenvwrapper.qhc"
70-
71-
latex:
72-
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
73-
@echo
74-
@echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex."
75-
@echo "Run \`make all-pdf' or \`make all-ps' in that directory to" \
76-
"run these through (pdf)latex."
77-
78-
changes:
79-
$(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes
80-
@echo
81-
@echo "The overview file is in $(BUILDDIR)/changes."
82-
83-
linkcheck:
84-
$(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck
85-
@echo
86-
@echo "Link check complete; look for any errors in the above output " \
87-
"or in $(BUILDDIR)/linkcheck/output.txt."
88-
89-
doctest:
90-
$(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest
91-
@echo "Testing of doctests in the sources finished, look at the " \
92-
"results in $(BUILDDIR)/doctest/output.txt."
39+
@echo "Build finished. The HTML pages are in $(BUILDDIR)."
40+
41+
# dirhtml:
42+
# $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml
43+
# @echo
44+
# @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml."
45+
46+
# pickle:
47+
# $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle
48+
# @echo
49+
# @echo "Build finished; now you can process the pickle files."
50+
51+
# json:
52+
# $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json
53+
# @echo
54+
# @echo "Build finished; now you can process the JSON files."
55+
56+
# htmlhelp:
57+
# $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp
58+
# @echo
59+
# @echo "Build finished; now you can run HTML Help Workshop with the" \
60+
# ".hhp project file in $(BUILDDIR)/htmlhelp."
61+
62+
# qthelp:
63+
# $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp
64+
# @echo
65+
# @echo "Build finished; now you can run "qcollectiongenerator" with the" \
66+
# ".qhcp project file in $(BUILDDIR)/qthelp, like this:"
67+
# @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/virtualenvwrapper.qhcp"
68+
# @echo "To view the help file:"
69+
# @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/virtualenvwrapper.qhc"
70+
71+
# latex:
72+
# $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
73+
# @echo
74+
# @echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex."
75+
# @echo "Run \`make all-pdf' or \`make all-ps' in that directory to" \
76+
# "run these through (pdf)latex."
77+
78+
# changes:
79+
# $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes
80+
# @echo
81+
# @echo "The overview file is in $(BUILDDIR)/changes."
82+
83+
# linkcheck:
84+
# $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck
85+
# @echo
86+
# @echo "Link check complete; look for any errors in the above output " \
87+
# "or in $(BUILDDIR)/linkcheck/output.txt."
88+
89+
# doctest:
90+
# $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest
91+
# @echo "Testing of doctests in the sources finished, look at the " \
92+
# "results in $(BUILDDIR)/doctest/output.txt."

0 commit comments

Comments
 (0)