summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulian Andres Klode <jak@debian.org>2009-04-01 17:11:16 +0200
committerJulian Andres Klode <jak@debian.org>2009-04-01 17:11:16 +0200
commit192a186f6613f02e0fcef12da11412ec6001ed8c (patch)
treeb418536ec04f52d8a73d610e8ca04733dd06a288
parent312b5ca7acbe74bc73acc2b710628ea2a8ad83cc (diff)
downloadpython-apt-192a186f6613f02e0fcef12da11412ec6001ed8c.tar.gz
* Fix documentation building
- doc/source/conf.py: Only include directories for current python version. - debian/control: Build-Depend on python-gtk2, python-vte. - setup.py: If pygtk can not be imported, do not build the documentation.
-rw-r--r--debian/changelog4
-rw-r--r--debian/control4
-rw-r--r--doc/source/conf.py6
-rwxr-xr-xsetup.py5
4 files changed, 17 insertions, 2 deletions
diff --git a/debian/changelog b/debian/changelog
index 91ce7304..4bc94036 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -9,6 +9,10 @@ python-apt (0.7.10~exp1) experimental; urgency=low
- Update Standards-Version to 3.8.1
- Use ${binary:Version} instead of ${Source-Version}
* debian/copyright: Switch to machine-interpretable copyright
+ * Fix documentation building
+ - doc/source/conf.py: Only include directories for current python version.
+ - debian/control: Build-Depend on python-gtk2, python-vte.
+ - setup.py: If pygtk can not be imported, do not build the documentation.
-- Julian Andres Klode <jak@debian.org> Wed, 01 Apr 2009 15:24:29 +0200
diff --git a/debian/control b/debian/control
index 9afd50e0..c06611e2 100644
--- a/debian/control
+++ b/debian/control
@@ -14,7 +14,9 @@ Build-Depends: apt-utils,
python-central (>= 0.5),
python-debian,
python-distutils-extra (>= 1.9.0),
- python-sphinx (>= 0.5)
+ python-gtk2,
+ python-sphinx (>= 0.5),
+ python-vte
Vcs-Bzr: http://bzr.debian.org/apt/python-apt/debian-sid
Vcs-Browser: http://bzr.debian.org/loggerhead/apt/python-apt/debian-sid/changes
diff --git a/doc/source/conf.py b/doc/source/conf.py
index 17fe6a23..40154a6f 100644
--- a/doc/source/conf.py
+++ b/doc/source/conf.py
@@ -23,9 +23,13 @@ import sys
# absolute, like shown here.
sys.path.insert(0, os.path.abspath('..'))
sys.path.insert(0, os.path.abspath('../..'))
+
+# Find the path to the built apt_pkg and apt_inst extensions
if os.path.exists("../../build"):
+ version = '.'.join(str(x) for x in sys.version_info[:2])
for dirname in os.listdir('../../build'):
- sys.path.insert(0, os.path.abspath('../../build/' + dirname))
+ if version in dirname:
+ sys.path.insert(0, os.path.abspath('../../build/' + dirname))
# General configuration
# ---------------------
diff --git a/setup.py b/setup.py
index 1c266ce7..3d378050 100755
--- a/setup.py
+++ b/setup.py
@@ -75,6 +75,11 @@ setup(name="python-apt",
if len(sys.argv) > 1 and sys.argv[1] == "build":
import sphinx
+ try:
+ import pygtk
+ except ImportError:
+ print >> sys.stderr, 'E: python-gtk2 is required to build documentation.'
+ sys.exit(0)
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",