summaryrefslogtreecommitdiff
path: root/setup.py
diff options
context:
space:
mode:
authorJulian Andres Klode <jak@debian.org>2009-01-09 21:52:32 +0100
committerJulian Andres Klode <jak@debian.org>2009-01-09 21:52:32 +0100
commit21ba650e32457ee67ac0f85b03c071969aa5934b (patch)
treecd9658996fbc6178317538b167f5281c92f1e6f4 /setup.py
parent6a806f0570599e8f5e9438c9623d496df75571d4 (diff)
downloadpython-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.
Diffstat (limited to 'setup.py')
-rwxr-xr-xsetup.py14
1 files changed, 10 insertions, 4 deletions
diff --git a/setup.py b/setup.py
index 1ff7cb16..016db85a 100755
--- a/setup.py
+++ b/setup.py
@@ -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"])