[PATCH 1/4] Fix pydoctor invocation.

Jelmer Vernooij jelmer at samba.org
Sun Oct 12 17:48:19 MDT 2014


Signed-Off-By: Jelmer Vernooij <jelmer at samba.org>
Bug: https://bugzilla.samba.org/show_bug.cgi?id=10754
Change-Id: I1ca311dcba52350dc284439119a8166dee1de50a
---
 wscript | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/wscript b/wscript
index 7124e57..ee0b7ee 100644
--- 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):
-- 
2.1.1



More information about the samba-technical mailing list