tdb: Only set public headers field when installing as a public library.
[obnox/samba/samba-obnox.git] / lib / tdb / wscript
index 5845fa0fc530e5c9b5f53aa21d48ea453ff5e1a0..e5c0ead6a5bbd0ca46b8ad227b5e33ceeb7c25e0 100644 (file)
@@ -1,7 +1,7 @@
 #!/usr/bin/env python
 
 APPNAME = 'tdb'
-VERSION = '1.3.7'
+VERSION = '1.3.8'
 
 blddir = 'bin'
 
@@ -138,7 +138,7 @@ def build(bld):
                           abi_match='tdb_*',
                           hide_symbols=True,
                           vnum=VERSION,
-                          public_headers='include/tdb.h',
+                          public_headers=('' if private_library else 'include/tdb.h'),
                           public_headers_install=not private_library,
                           pc_files='tdb.pc',
                           private_library=private_library)
@@ -187,12 +187,13 @@ def build(bld):
                              realname='tdb.so',
                              cflags='-DPACKAGE_VERSION=\"%s\"' % VERSION)
 
-        for env in bld.gen_python_environments(['PKGCONFIGDIR']):
-            bld.SAMBA_SCRIPT('_tdb_text.py',
-                             pattern='_tdb_text.py',
-                             installdir='python')
+        if not bld.env.disable_python:
+            for env in bld.gen_python_environments(['PKGCONFIGDIR']):
+                bld.SAMBA_SCRIPT('_tdb_text.py',
+                                 pattern='_tdb_text.py',
+                                 installdir='python')
 
-            bld.INSTALL_FILES('${PYTHONARCHDIR}', '_tdb_text.py')
+                bld.INSTALL_FILES('${PYTHONARCHDIR}', '_tdb_text.py')
 
 def testonly(ctx):
     '''run tdb testsuite'''