summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2010-03-29 17:12:04 +1100
committerAndrew Tridgell <tridge@samba.org>2010-04-06 20:27:15 +1000
commitcd8de1581919dc9df43f3e2c6e045447129f49bc (patch)
tree361c8660c79f40425dc5685396069105c35291d2
parentda1fed0a8f71d8190cf4bb0094f58f9c2a12b317 (diff)
downloadsamba-cd8de1581919dc9df43f3e2c6e045447129f49bc.tar.gz
samba-cd8de1581919dc9df43f3e2c6e045447129f49bc.tar.bz2
samba-cd8de1581919dc9df43f3e2c6e045447129f49bc.zip
s4-waf: added pydoctor and wafdocs targets
these generate html documentation for the Samba python code You need a very recent version of pydoctor
-rw-r--r--source4/wscript20
1 files changed, 20 insertions, 0 deletions
diff --git a/source4/wscript b/source4/wscript
index e662d0db92..09ce8a3ccc 100644
--- a/source4/wscript
+++ b/source4/wscript
@@ -93,3 +93,23 @@ def ctags(ctx):
def build(bld):
'''build all targets'''
pass
+
+
+def pydoctor(ctx):
+ '''build python apidocs'''
+ cmd='LD_LIBRARY_PATH=bin/shared PYTHONPATH=bin/python pydoctor --project-name=Samba --project-url=http://www.samba.org --make-html --docformat=restructuredtext --add-package bin/python/samba'
+ print "Running: %s" % cmd
+ os.system(cmd)
+
+def wafdocs(ctx):
+ '''build wafsamba apidocs'''
+ from samba_utils import recursive_dirlist
+ os.system('pwd')
+ list = recursive_dirlist('../buildtools/wafsamba', '.', pattern='*.py')
+
+ cmd='LD_LIBRARY_PATH=bin/shared PYTHONPATH=bin/python pydoctor --project-name=wafsamba --project-url=http://www.samba.org --make-html --docformat=restructuredtext'
+ print list
+ for f in list:
+ cmd += ' --add-module %s' % f
+ print "Running: %s" % cmd
+ os.system(cmd)