talloc: Add ability to generate Python docs using pydoctor.
[metze/samba/wip.git] / lib / talloc / wscript
index a23532a189cee1afa85999034a91a96443c64e6d..b4cb84bbd8a000edf94f5a9c38cfa8f6ac2bcd27 100644 (file)
@@ -59,7 +59,7 @@ def configure(conf):
         # also disable if we don't have the python libs installed
         conf.check_tool('python')
         conf.check_python_version((2,4,2))
-        conf.check_python_headers(mandatory=False)
+        conf.SAMBA_CHECK_PYTHON_HEADERS(mandatory=False)
         if not conf.env.HAVE_PYTHON_H:
             Logs.warn('Disabling pytalloc-util as python devel libs not found')
             conf.env.disable_python = True
@@ -106,8 +106,6 @@ def build(bld):
         bld.SAMBA_LIBRARY('pytalloc-util',
             source='pytalloc_util.c',
             public_deps='talloc',
-            abi_directory='ABI',
-            abi_match='py* Py*',
             pyext=True,
             vnum=VERSION,
             private_library=private_library,
@@ -143,3 +141,10 @@ def reconfigure(ctx):
     '''reconfigure if config scripts have changed'''
     import samba_utils
     samba_utils.reconfigure(ctx)
+
+
+def pydoctor(ctx):
+    '''build python apidocs'''
+    cmd='PYTHONPATH=bin/python pydoctor --project-name=talloc --project-url=http://talloc.samba.org/ --make-html --docformat=restructuredtext --introspect-c-modules --add-module bin/python/talloc.*'
+    print("Running: %s" % cmd)
+    os.system(cmd)