summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPetr Viktorin <pviktori@redhat.com>2015-05-22 17:12:37 +0200
committerAndreas Schneider <asn@cryptomilk.org>2015-07-21 19:04:15 +0200
commit13c24b3416be61fd150d9ca047aafeeb676c94a3 (patch)
tree1d1237802adcc06dc2daa5a0949722fc6b2c2f47
parent11eb2e4e3d92cd41236f81ded67735ba9c0ce31b (diff)
downloadsamba-13c24b3416be61fd150d9ca047aafeeb676c94a3.tar.gz
pytdb: Build for two versions of Python at once
Signed-off-by: Petr Viktorin <pviktori@redhat.com> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
-rw-r--r--lib/tdb/wscript16
1 files changed, 8 insertions, 8 deletions
diff --git a/lib/tdb/wscript b/lib/tdb/wscript
index acc0d5d1695..3b446975404 100644
--- a/lib/tdb/wscript
+++ b/lib/tdb/wscript
@@ -96,8 +96,7 @@ def configure(conf):
if not conf.env.disable_python:
# also disable if we don't have the python libs installed
- conf.find_program('python', var='PYTHON')
- conf.check_tool('python')
+ conf.SAMBA_CHECK_PYTHON(mandatory=False)
conf.check_python_version((2,4,2))
conf.SAMBA_CHECK_PYTHON_HEADERS(mandatory=False)
if not conf.env.HAVE_PYTHON_H:
@@ -180,12 +179,13 @@ def build(bld):
includes='include', install=False)
if not bld.CONFIG_SET('USING_SYSTEM_PYTDB'):
- bld.SAMBA_PYTHON('pytdb',
- 'pytdb.c',
- deps='tdb',
- enabled=not bld.env.disable_python,
- realname='tdb.so',
- cflags='-DPACKAGE_VERSION=\"%s\"' % VERSION)
+ for env in bld.gen_python_environments(['PKGCONFIGDIR']):
+ bld.SAMBA_PYTHON('pytdb',
+ 'pytdb.c',
+ deps='tdb',
+ enabled=not bld.env.disable_python,
+ realname='tdb.so',
+ cflags='-DPACKAGE_VERSION=\"%s\"' % VERSION)
def testonly(ctx):
'''run tdb testsuite'''