diff options
author | Daniele Varrazzo <daniele.varrazzo@gmail.com> | 2010-02-14 16:11:01 +0000 |
---|---|---|
committer | Daniele Varrazzo <daniele.varrazzo@gmail.com> | 2010-02-14 16:45:36 +0000 |
commit | b744c92f58ab3dfc65d51dfe61acc11427a192dd (patch) | |
tree | 04d4f89e839fde6384371589dabb6aae01e773d8 | |
parent | 620f77cb77304e1b03d311204e5f942109b1a5f4 (diff) | |
download | psycopg2-b744c92f58ab3dfc65d51dfe61acc11427a192dd.tar.gz |
Documentation dir reordered.
-rw-r--r-- | .gitignore | 2 | ||||
-rw-r--r-- | doc/Makefile | 105 | ||||
-rw-r--r-- | doc/README | 12 | ||||
-rw-r--r-- | doc/src/Makefile | 99 | ||||
-rw-r--r-- | doc/src/_static/psycopg.css (renamed from doc/_static/psycopg.css) | 0 | ||||
-rw-r--r-- | doc/src/advanced.rst (renamed from doc/advanced.rst) | 0 | ||||
-rw-r--r-- | doc/src/conf.py (renamed from doc/conf.py) | 2 | ||||
-rw-r--r-- | doc/src/connection.rst (renamed from doc/connection.rst) | 0 | ||||
-rw-r--r-- | doc/src/cursor.rst (renamed from doc/cursor.rst) | 0 | ||||
-rw-r--r-- | doc/src/errorcodes.rst (renamed from doc/errorcodes.rst) | 0 | ||||
-rw-r--r-- | doc/src/extensions.rst (renamed from doc/extensions.rst) | 0 | ||||
-rw-r--r-- | doc/src/extras.rst (renamed from doc/extras.rst) | 0 | ||||
-rw-r--r-- | doc/src/index.rst (renamed from doc/index.rst) | 0 | ||||
-rw-r--r-- | doc/src/module.rst (renamed from doc/module.rst) | 0 | ||||
-rwxr-xr-x | doc/src/tools/lib/dbapi_extension.py (renamed from doc/dbapi_extension.py) | 0 | ||||
-rw-r--r-- | doc/src/tools/lib/sql_role.py (renamed from doc/sql_role.py) | 0 | ||||
-rwxr-xr-x | doc/src/tools/stitch_text.py (renamed from doc/tools/stitch_text.py) | 0 | ||||
-rw-r--r-- | doc/src/tz.rst (renamed from doc/tz.rst) | 0 | ||||
-rw-r--r-- | doc/src/usage.rst (renamed from doc/usage.rst) | 0 |
19 files changed, 116 insertions, 104 deletions
@@ -6,6 +6,6 @@ MANIFEST *.sw[po] dist/* build/* -doc/_build/* +doc/src/_build/* doc/html/* doc/psycopg2.txt diff --git a/doc/Makefile b/doc/Makefile index 7dc0f3d..54b5923 100644 --- a/doc/Makefile +++ b/doc/Makefile @@ -1,104 +1,23 @@ -# Makefile for Sphinx documentation -# +.PHONY: help clean html text doctest -# You can set these variables from the command line. -SPHINXOPTS = -SPHINXBUILD = sphinx-build -PAPER = -BUILDDIR = _build - -# DSN for the doctest database -PSYCOPG2_DSN="user=postgres dbname=test" - -# Internal variables. -PAPEROPT_a4 = -D latex_paper_size=a4 -PAPEROPT_letter = -D latex_paper_size=letter -ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . - -.PHONY: help clean html dirhtml pickle json htmlhelp qthelp latex changes linkcheck doctest - -all: html text +docs: html text check: doctest help: - @echo "Please use \`make <target>' where <target> is one of" - @echo " html to make standalone HTML files" - @echo " dirhtml to make HTML files named index.html in directories" - @echo " pickle to make pickle files" - @echo " json to make JSON files" - @echo " htmlhelp to make HTML files and a HTML help project" - @echo " qthelp to make HTML files and a qthelp project" - @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter" - @echo " changes to make an overview of all changed/added/deprecated items" - @echo " linkcheck to check all external links for integrity" - @echo " doctest to run all doctests embedded in the documentation (if enabled)" - -clean: - -rm -rf $(BUILDDIR)/* - -rm -rf ./html/* + cd src && $(MAKE) $@ html: - $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) ./html - @echo - @echo "Build finished. The HTML pages are in ./html." - -dirhtml: - $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml - @echo - @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml." + cd src && $(MAKE) $@ + cp -r src/_build/html . text: - $(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text - tools/stitch_text.py index.rst $(BUILDDIR)/text > psycopg2.txt - @echo - @echo "Build finished. The text file is psycopg2.txt." - -pickle: - $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle - @echo - @echo "Build finished; now you can process the pickle files." - -json: - $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json - @echo - @echo "Build finished; now you can process the JSON files." - -htmlhelp: - $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp - @echo - @echo "Build finished; now you can run HTML Help Workshop with the" \ - ".hhp project file in $(BUILDDIR)/htmlhelp." - -qthelp: - $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp - @echo - @echo "Build finished; now you can run "qcollectiongenerator" with the" \ - ".qhcp project file in $(BUILDDIR)/qthelp, like this:" - @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/psycopg.qhcp" - @echo "To view the help file:" - @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/psycopg.qhc" - -latex: - $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex - @echo - @echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex." - @echo "Run \`make all-pdf' or \`make all-ps' in that directory to" \ - "run these through (pdf)latex." - -changes: - $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes - @echo - @echo "The overview file is in $(BUILDDIR)/changes." - -linkcheck: - $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck - @echo - @echo "Link check complete; look for any errors in the above output " \ - "or in $(BUILDDIR)/linkcheck/output.txt." + cd src && $(MAKE) $@ + cd src && tools/stitch_text.py index.rst _build/text > ../psycopg2.txt doctest: - PSYCOPG2_DSN=$(PSYCOPG2_DSN) \ - $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest - @echo "Testing of doctests in the sources finished, look at the " \ - "results in $(BUILDDIR)/doctest/output.txt." + cd src && $(MAKE) $@ + +clean: + cd src && $(MAKE) $@ + rm -rf html psycopg2.txt @@ -20,13 +20,6 @@ How to build psycopg documentation ... Finished processing dependencies for sphinx -- Checkout the psycopg branch containing the documentation:: - - (pd)~/pd$ git clone git://github.com/dvarrazzo/psycopg2.git - (pd)~/pd$ cd psycopg2/ - (pd)~/pd/psycopg2$ git branch - * docs - - Build psycopg2 and ensure the package can be imported (it will be used for reading the version number, autodocs etc.):: @@ -40,9 +33,10 @@ How to build psycopg documentation - Move to the ``doc`` dir and run ``make`` from there:: (pd)~/pd/psycopg2$ cd doc/ - (pd)~/pd/psycopg2/doc$ make html + (pd)~/pd/psycopg2/doc$ make Running Sphinx v0.6.4 ... -You should have the rendered documentation in ``./html`` now. +You should have the rendered documentation in ``./html`` and the text file +``psycopg2.txt`` now. diff --git a/doc/src/Makefile b/doc/src/Makefile new file mode 100644 index 0000000..53d0680 --- /dev/null +++ b/doc/src/Makefile @@ -0,0 +1,99 @@ +# Makefile for Sphinx documentation +# + +# You can set these variables from the command line. +SPHINXOPTS = +SPHINXBUILD = sphinx-build +PAPER = +BUILDDIR = _build + +# DSN for the doctest database +PSYCOPG2_DSN="user=postgres dbname=test" + +# Internal variables. +PAPEROPT_a4 = -D latex_paper_size=a4 +PAPEROPT_letter = -D latex_paper_size=letter +ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . + +.PHONY: help clean html dirhtml pickle json htmlhelp qthelp latex changes linkcheck doctest + +help: + @echo "Please use \`make <target>' where <target> is one of" + @echo " html to make standalone HTML files" + @echo " dirhtml to make HTML files named index.html in directories" + @echo " pickle to make pickle files" + @echo " json to make JSON files" + @echo " htmlhelp to make HTML files and a HTML help project" + @echo " qthelp to make HTML files and a qthelp project" + @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter" + @echo " changes to make an overview of all changed/added/deprecated items" + @echo " linkcheck to check all external links for integrity" + @echo " doctest to run all doctests embedded in the documentation (if enabled)" + +clean: + -rm -rf $(BUILDDIR)/* + -rm -rf ./html/* + +html: + $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html + @echo + @echo "Build finished. The HTML pages are in $(BUILDDIR)/html." + +dirhtml: + $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml + @echo + @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml." + +text: + $(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text + @echo + @echo "Build finished. The text pages are in $(BUILDDIR)/text." + +pickle: + $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle + @echo + @echo "Build finished; now you can process the pickle files." + +json: + $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json + @echo + @echo "Build finished; now you can process the JSON files." + +htmlhelp: + $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp + @echo + @echo "Build finished; now you can run HTML Help Workshop with the" \ + ".hhp project file in $(BUILDDIR)/htmlhelp." + +qthelp: + $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp + @echo + @echo "Build finished; now you can run "qcollectiongenerator" with the" \ + ".qhcp project file in $(BUILDDIR)/qthelp, like this:" + @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/psycopg.qhcp" + @echo "To view the help file:" + @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/psycopg.qhc" + +latex: + $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex + @echo + @echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex." + @echo "Run \`make all-pdf' or \`make all-ps' in that directory to" \ + "run these through (pdf)latex." + +changes: + $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes + @echo + @echo "The overview file is in $(BUILDDIR)/changes." + +linkcheck: + $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck + @echo + @echo "Link check complete; look for any errors in the above output " \ + "or in $(BUILDDIR)/linkcheck/output.txt." + +doctest: + PSYCOPG2_DSN=$(PSYCOPG2_DSN) \ + $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest + @echo "Testing of doctests in the sources finished, look at the " \ + "results in $(BUILDDIR)/doctest/output.txt." diff --git a/doc/_static/psycopg.css b/doc/src/_static/psycopg.css index df52b32..df52b32 100644 --- a/doc/_static/psycopg.css +++ b/doc/src/_static/psycopg.css diff --git a/doc/advanced.rst b/doc/src/advanced.rst index 64aa704..64aa704 100644 --- a/doc/advanced.rst +++ b/doc/src/advanced.rst diff --git a/doc/conf.py b/doc/src/conf.py index 1577bac..f7f370b 100644 --- a/doc/conf.py +++ b/doc/src/conf.py @@ -16,7 +16,7 @@ import sys, os # If extensions (or modules to document with autodoc) are in another directory, # add these directories to sys.path here. If the directory is relative to the # documentation root, use os.path.abspath to make it absolute, like shown here. -sys.path.append(os.path.abspath('.')) +sys.path.append(os.path.abspath('tools/lib')) # -- General configuration ----------------------------------------------------- diff --git a/doc/connection.rst b/doc/src/connection.rst index c7da5f1..c7da5f1 100644 --- a/doc/connection.rst +++ b/doc/src/connection.rst diff --git a/doc/cursor.rst b/doc/src/cursor.rst index b46f129..b46f129 100644 --- a/doc/cursor.rst +++ b/doc/src/cursor.rst diff --git a/doc/errorcodes.rst b/doc/src/errorcodes.rst index e1c76c0..e1c76c0 100644 --- a/doc/errorcodes.rst +++ b/doc/src/errorcodes.rst diff --git a/doc/extensions.rst b/doc/src/extensions.rst index 59bbc6e..59bbc6e 100644 --- a/doc/extensions.rst +++ b/doc/src/extensions.rst diff --git a/doc/extras.rst b/doc/src/extras.rst index dd7ed39..dd7ed39 100644 --- a/doc/extras.rst +++ b/doc/src/extras.rst diff --git a/doc/index.rst b/doc/src/index.rst index 4b32069..4b32069 100644 --- a/doc/index.rst +++ b/doc/src/index.rst diff --git a/doc/module.rst b/doc/src/module.rst index 3bb7559..3bb7559 100644 --- a/doc/module.rst +++ b/doc/src/module.rst diff --git a/doc/dbapi_extension.py b/doc/src/tools/lib/dbapi_extension.py index 583c752..583c752 100755 --- a/doc/dbapi_extension.py +++ b/doc/src/tools/lib/dbapi_extension.py diff --git a/doc/sql_role.py b/doc/src/tools/lib/sql_role.py index 8fb8ab8..8fb8ab8 100644 --- a/doc/sql_role.py +++ b/doc/src/tools/lib/sql_role.py diff --git a/doc/tools/stitch_text.py b/doc/src/tools/stitch_text.py index c54f4b1..c54f4b1 100755 --- a/doc/tools/stitch_text.py +++ b/doc/src/tools/stitch_text.py diff --git a/doc/tz.rst b/doc/src/tz.rst index 3cac88c..3cac88c 100644 --- a/doc/tz.rst +++ b/doc/src/tz.rst diff --git a/doc/usage.rst b/doc/src/usage.rst index 9d86d6e..9d86d6e 100644 --- a/doc/usage.rst +++ b/doc/src/usage.rst |