From 8bf60364828c7b3b1d8f6d79b6834bc5a8ed4339 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Sun, 12 Oct 2014 15:48:53 -0700 Subject: [PATCH] Fix pydoctor invocation. Signed-Off-By: Jelmer Vernooij Reviewed-by: Andrew Bartlett 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 7124e576d23..ee0b7eeca08 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.34.1