Fix pydoctor invocation.
authorJelmer Vernooij <jelmer@samba.org>
Sun, 12 Oct 2014 22:48:53 +0000 (15:48 -0700)
committerAndrew Bartlett <abartlet@samba.org>
Tue, 14 Oct 2014 04:44:06 +0000 (06:44 +0200)
Signed-Off-By: Jelmer Vernooij <jelmer@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Bug: https://bugzilla.samba.org/show_bug.cgi?id=10754
Change-Id: I1ca311dcba52350dc284439119a8166dee1de50a

wscript

diff --git a/wscript b/wscript
index 7124e576d238ec5f254994e4fb845f9ca805b487..ee0b7eeca08fc87b7fc3f0deba5e877d07a2a20d 100644 (file)
--- a/wscript
+++ b/wscript
@@ -263,14 +263,18 @@ def pydoctor(ctx):
     '''build python apidocs'''
     bp = os.path.abspath('bin/python')
     mpaths = {}
-    for m in ['talloc', 'tdb', 'ldb', 'ntdb']:
+    modules = ['talloc', 'tdb', 'ldb', 'ntdb']
+    for m in modules:
         f = os.popen("PYTHONPATH=%s python -c 'import %s; print %s.__file__'" % (bp, m, m), 'r')
         try:
             mpaths[m] = f.read().strip()
         finally:
             f.close()
-    cmd='PYTHONPATH=%s pydoctor --introspect-c-modules --project-name=Samba --project-url=http://www.samba.org --make-html --docformat=restructuredtext --add-package bin/python/samba --add-module %s --add-module %s --add-module %s' % (
-        bp, mpaths['tdb'], mpaths['ldb'], mpaths['talloc'], mpaths['ntdb'])
+    mpaths['main'] = bp
+    cmd = ('PYTHONPATH=%(main)s pydoctor --introspect-c-modules --project-name=Samba '
+           '--project-url=http://www.samba.org --make-html --docformat=restructuredtext '
+           '--add-package bin/python/samba ' + ''.join('--add-module %s ' % n for n in modules))
+    cmd = cmd % mpaths
     print("Running: %s" % cmd)
     status = os.system(cmd)
     if os.WEXITSTATUS(status):