diff options
| author | Julian Andres Klode <jak@debian.org> | 2009-01-09 21:52:32 +0100 |
|---|---|---|
| committer | Julian Andres Klode <jak@debian.org> | 2009-01-09 21:52:32 +0100 |
| commit | 21ba650e32457ee67ac0f85b03c071969aa5934b (patch) | |
| tree | cd9658996fbc6178317538b167f5281c92f1e6f4 | |
| parent | 6a806f0570599e8f5e9438c9623d496df75571d4 (diff) | |
| download | python-apt-21ba650e32457ee67ac0f85b03c071969aa5934b.tar.gz | |
* setup.py, doc/source/conf.py: Fix building by adding build/lib* to PYTHONPATH
We now build the extension first, and then the documentation. Also add
the text docs.
| -rw-r--r-- | debian/changelog | 6 | ||||
| -rw-r--r-- | debian/python-apt.docs | 3 | ||||
| -rwxr-xr-x | debian/rules | 1 | ||||
| -rw-r--r-- | doc/Makefile | 4 | ||||
| -rw-r--r-- | doc/source/conf.py | 7 | ||||
| -rw-r--r-- | po/python-apt.pot | 2 | ||||
| -rwxr-xr-x | setup.py | 14 |
7 files changed, 27 insertions, 10 deletions
diff --git a/debian/changelog b/debian/changelog index 1002bead..7d37e7be 100644 --- a/debian/changelog +++ b/debian/changelog @@ -13,7 +13,9 @@ python-apt (0.7.9~exp2) experimental; urgency=low - debian/rules: Build the documentation here - setup.py: Remove pydoc building and add new docs. - debian/examples: Include examples from documentation - - debian/python-apt.docs: Change html/ to doc/build/html. + - debian/python-apt.docs: + + Change html/ to build/doc/html. + + Add build/doc/text for the text-only documentation * setup.py: - Only create build/data when building, not all the time - Remove build/mo and build/data on clean -a @@ -22,7 +24,7 @@ python-apt (0.7.9~exp2) experimental; urgency=low they are only needed for oldstable (sarge) - Build-Depend on python-sphinx (>= 0.5) - -- Julian Andres Klode <jak@debian.org> Fri, 09 Jan 2009 17:20:41 +0100 + -- Julian Andres Klode <jak@debian.org> Fri, 09 Jan 2009 18:11:30 +0100 python-apt (0.7.9~exp1) experimental; urgency=low diff --git a/debian/python-apt.docs b/debian/python-apt.docs index ff53abec..6ba083f5 100644 --- a/debian/python-apt.docs +++ b/debian/python-apt.docs @@ -1,4 +1,5 @@ README apt/README.apt data/templates/README.templates -doc/build/html/ +build/doc/html/ +build/doc/text/ diff --git a/debian/rules b/debian/rules index adaad2a8..90b48cda 100755 --- a/debian/rules +++ b/debian/rules @@ -13,6 +13,7 @@ include /usr/share/cdbs/1/class/python-distutils.mk PKG=python-apt DEBVER=$(shell dpkg-parsechangelog |sed -n -e '/^Version:/s/^Version: //p') +DEB_COMPRESS_EXCLUDE:=.html .js _static/* _sources/* _sources/*/* .inv DEB_BUILD_PROG:=debuild --preserve-envvar PATH --preserve-envvar CCACHE_DIR -us -uc $(DEB_BUILD_PROG_OPTS) build/python-apt-dbg:: diff --git a/doc/Makefile b/doc/Makefile index 39fe377f..327bba91 100644 --- a/doc/Makefile +++ b/doc/Makefile @@ -26,6 +26,10 @@ help: clean: -rm -rf build/* +text: + mkdir -p build/text build/doctrees + $(SPHINXBUILD) -b text $(ALLSPHINXOPTS) build/text + html: mkdir -p build/html build/doctrees $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) build/html diff --git a/doc/source/conf.py b/doc/source/conf.py index 4cd444f1..907e2275 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -19,8 +19,11 @@ import sys, os # 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 # absolute, like shown here. -sys.path.insert(0,os.path.abspath('..')) -sys.path.insert(0,os.path.abspath('../..')) +sys.path.insert(0, os.path.abspath('..')) +sys.path.insert(0, os.path.abspath('../..')) +if os.path.exists("../../build"): + for dirname in os.listdir('../../build'): + sys.path.insert(0, os.path.abspath('../../build/' + dirname)) # General configuration # --------------------- diff --git a/po/python-apt.pot b/po/python-apt.pot index 6ffef103..6af898db 100644 --- a/po/python-apt.pot +++ b/po/python-apt.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2009-01-09 17:23+0100\n" +"POT-Creation-Date: 2009-01-09 18:08+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <LL@li.org>\n" @@ -10,7 +10,6 @@ import os.path import pydoc import shutil import string -import subprocess import sys @@ -39,10 +38,10 @@ if len(sys.argv) > 1 and sys.argv[1] == "build": build.write(line.lstrip("_")) source.close() build.close() - if subprocess.call(["make", "-C", "doc", "html"]) : - raise SystemError + + if len(sys.argv) > 1 and sys.argv[1] == "clean" and '-a' in sys.argv: - for dirname in "doc/build", "build/data", "build/mo": + for dirname in "build/doc", "doc/build", "build/data", "build/mo": if os.path.exists(dirname): print "Removing", dirname shutil.rmtree(dirname) @@ -65,3 +64,10 @@ setup(name="python-apt", license = 'GNU GPL', platforms = 'posix' ) + +if len(sys.argv) > 1 and sys.argv[1] == "build": + import sphinx + sphinx.main(["sphinx", "-b", "html", "-d", "build/doc/doctrees", + os.path.abspath("doc/source"), "build/doc/html"]) + sphinx.main(["sphinx", "-b", "text", "-d", "build/doc/doctrees", + os.path.abspath("doc/source"), "build/doc/text"]) |
