mirror of
https://github.com/samba-team/samba.git
synced 2025-01-08 21:18:16 +03:00
waf: disable-python - align talloc's wscript
Drop the configure option for --disable-python as it is now global in wafsamba If samba is set to use a system copy of talloc, and talloc wasn't built with python support, then the system pytalloc-util will not be found. If samba is being built without python support then pytalloc-util is not needed, so do not bother to try and find it. The build configuration for pytalloc-util needs to exist even if it's not being built, so that dependency resolution can occur throughout the rest of the samba build system -- this required dropping the higher level conditional and using the enabled= parameter instead. Signed-off-by: Ian Stakenvicius <axs@gentoo.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
This commit is contained in:
parent
7d5db90850
commit
dcba0b1975
@ -32,9 +32,6 @@ def set_options(opt):
|
||||
opt.add_option('--enable-talloc-compat1',
|
||||
help=("Build talloc 1.x.x compat library [False]"),
|
||||
action="store_true", dest='TALLOC_COMPAT1', default=False)
|
||||
opt.add_option('--disable-python',
|
||||
help=("disable the pytalloc module"),
|
||||
action="store_true", dest='disable_python', default=False)
|
||||
|
||||
|
||||
def configure(conf):
|
||||
@ -46,8 +43,6 @@ def configure(conf):
|
||||
conf.define('TALLOC_BUILD_VERSION_MINOR', int(VERSION.split('.')[1]))
|
||||
conf.define('TALLOC_BUILD_VERSION_RELEASE', int(VERSION.split('.')[2]))
|
||||
|
||||
conf.env.disable_python = getattr(Options.options, 'disable_python', False)
|
||||
|
||||
conf.env.TALLOC_COMPAT1 = False
|
||||
if conf.env.standalone_talloc:
|
||||
conf.env.TALLOC_COMPAT1 = Options.options.TALLOC_COMPAT1
|
||||
@ -142,7 +137,7 @@ def build(bld):
|
||||
private_library=private_library,
|
||||
manpages='man/talloc.3')
|
||||
|
||||
if not bld.CONFIG_SET('USING_SYSTEM_PYTALLOC_UTIL') and not bld.env.disable_python:
|
||||
if not bld.CONFIG_SET('USING_SYSTEM_PYTALLOC_UTIL'):
|
||||
for env in bld.gen_python_environments(['PKGCONFIGDIR']):
|
||||
name = bld.pyembed_libname('pytalloc-util')
|
||||
|
||||
@ -156,16 +151,19 @@ def build(bld):
|
||||
abi_match='pytalloc_* _pytalloc_*',
|
||||
private_library=private_library,
|
||||
public_headers=('' if private_library else 'pytalloc.h'),
|
||||
pc_files='pytalloc-util.pc'
|
||||
pc_files='pytalloc-util.pc',
|
||||
enabled=bld.PYTHON_BUILD_IS_ENABLED()
|
||||
)
|
||||
bld.SAMBA_PYTHON('pytalloc',
|
||||
'pytalloc.c',
|
||||
deps='talloc ' + name,
|
||||
enabled=bld.PYTHON_BUILD_IS_ENABLED(),
|
||||
realname='talloc.so')
|
||||
|
||||
bld.SAMBA_PYTHON('test_pytalloc',
|
||||
'test_pytalloc.c',
|
||||
deps='pytalloc',
|
||||
enabled=bld.PYTHON_BUILD_IS_ENABLED(),
|
||||
realname='_test_pytalloc.so',
|
||||
install=False)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user