Skip to content

Commit

Permalink
pytalloc: Build for two Python versions at once
Browse files Browse the repository at this point in the history
Signed-off-by: Petr Viktorin <[email protected]>
Reviewed-by: Andrew Bartlett <[email protected]>
Reviewed-by: Jelmer Vernooij <[email protected]>
  • Loading branch information
encukou authored and abartlet committed May 19, 2015
1 parent 616dfae commit fb5d9c3
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions lib/talloc/wscript
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,43 @@ def build(bld):
realname='_test_pytalloc.so',
install=False)

if bld.env['EXTRA_PYTHON']:
for var_name in ('GLOBAL_DEPENDENCIES', 'TARGET_TYPE', 'PKGCONFIGDIR'):
bld.all_envs['extrapython'][var_name] = bld.all_envs['default'][var_name]
bak = bld.all_envs['default']
bld.all_envs['default'] = bld.all_envs['extrapython']

name = bld.pyembed_libname('pytalloc-util')

bld.SAMBA_LIBRARY(name,
source='pytalloc_util.c',
public_deps='talloc',
pyembed=True,
vnum=VERSION,
hide_symbols=True,
abi_directory='ABI',
abi_match='pytalloc_*',
private_library=private_library,
#public_headers='pytalloc.h',
#pc_files='pytalloc-util.pc'
)

bld.SAMBA_PYTHON('extra-pytalloc',
'pytalloc.c',
deps='talloc ' + name,
enabled=True,
realname='talloc.so')

bld.SAMBA_PYTHON('extra-test_pytalloc',
'test_pytalloc.c',
deps='pytalloc',
enabled=True,
realname='_test_pytalloc.so',
install=False)

bld.all_envs['default'] = bak


def test(ctx):
'''run talloc testsuite'''
import Utils, samba_utils
Expand Down

0 comments on commit fb5d9c3

Please sign in to comment.