diff --git a/auth/credentials/wscript_build b/auth/credentials/wscript_build index aaef541f57a..637b6ccf268 100644 --- a/auth/credentials/wscript_build +++ b/auth/credentials/wscript_build @@ -24,12 +24,11 @@ bld.SAMBA_SUBSYSTEM('CREDENTIALS_NTLM', source='credentials_ntlm.c', deps='samba-credentials') -for env in bld.gen_python_environments(): - pytalloc_util = bld.pyembed_libname('pytalloc-util') - pyparam_util = bld.pyembed_libname('pyparam_util') +pytalloc_util = bld.pyembed_libname('pytalloc-util') +pyparam_util = bld.pyembed_libname('pyparam_util') - bld.SAMBA_PYTHON('pycredentials', - source='pycredentials.c', - public_deps='samba-credentials cmdline-credentials %s %s CREDENTIALS_KRB5 CREDENTIALS_SECRETS' % (pytalloc_util, pyparam_util), - realname='samba/credentials.so' - ) +bld.SAMBA_PYTHON('pycredentials', + source='pycredentials.c', + public_deps='samba-credentials cmdline-credentials %s %s CREDENTIALS_KRB5 CREDENTIALS_SECRETS' % (pytalloc_util, pyparam_util), + realname='samba/credentials.so' +) diff --git a/buildtools/wafsamba/samba_python.py b/buildtools/wafsamba/samba_python.py index 21fd3635e79..b29a9d75745 100644 --- a/buildtools/wafsamba/samba_python.py +++ b/buildtools/wafsamba/samba_python.py @@ -160,13 +160,3 @@ def pyembed_libname(bld, name): Build.BuildContext.pyembed_libname = pyembed_libname -def gen_python_environments(bld, extra_env_vars=()): - """Generate all Python environments - - To be used in a for loop. Normally, the loop body will be executed once. - - When --extra-python is used, the body will additionaly be executed - with the extra-python environment active. - """ - yield -Build.BuildContext.gen_python_environments = gen_python_environments diff --git a/lib/crypto/wscript_build b/lib/crypto/wscript_build index 77c62758ce8..6841f99d568 100644 --- a/lib/crypto/wscript_build +++ b/lib/crypto/wscript_build @@ -29,9 +29,8 @@ bld.SAMBA_SUBSYSTEM('TORTURE_LIBCRYPTO', deps='LIBCRYPTO' ) -for env in bld.gen_python_environments(): - bld.SAMBA_PYTHON('python_crypto', - source='py_crypto.c', - deps='LIBCRYPTO', - realname='samba/crypto.so' +bld.SAMBA_PYTHON('python_crypto', + source='py_crypto.c', + deps='LIBCRYPTO', + realname='samba/crypto.so' ) diff --git a/lib/ldb-samba/wscript_build b/lib/ldb-samba/wscript_build index 396a3816c21..3264757e8b7 100644 --- a/lib/ldb-samba/wscript_build +++ b/lib/ldb-samba/wscript_build @@ -18,13 +18,12 @@ bld.SAMBA_SUBSYSTEM('ldbwrap', deps='ldb samba-util ldbsamba samba-hostconfig' ) -for env in bld.gen_python_environments(): - pyparam_util = bld.pyembed_libname('pyparam_util') - pyldb_util = bld.pyembed_libname('pyldb-util') - pyauth = 'pyauth' - bld.SAMBA_PYTHON('python_samba__ldb', 'pyldb.c', - deps='ldbsamba %s ldbwrap %s %s' % (pyparam_util, pyldb_util, pyauth), - realname='samba/_ldb.so') +pyparam_util = bld.pyembed_libname('pyparam_util') +pyldb_util = bld.pyembed_libname('pyldb-util') +pyauth = 'pyauth' +bld.SAMBA_PYTHON('python_samba__ldb', 'pyldb.c', + deps='ldbsamba %s ldbwrap %s %s' % (pyparam_util, pyldb_util, pyauth), + realname='samba/_ldb.so') bld.SAMBA_MODULE('ldbsamba_extensions', source='samba_extensions.c', diff --git a/lib/ldb/wscript b/lib/ldb/wscript index 051c274f3c8..4f0c68c9c6c 100644 --- a/lib/ldb/wscript +++ b/lib/ldb/wscript @@ -234,37 +234,34 @@ def build(bld): if bld.PYTHON_BUILD_IS_ENABLED(): if not bld.CONFIG_SET('USING_SYSTEM_PYLDB_UTIL'): - for env in bld.gen_python_environments(['PKGCONFIGDIR']): + name = bld.pyembed_libname('pyldb-util') + bld.SAMBA_LIBRARY(name, + deps='replace ldb', + source='pyldb_util.c', + public_headers=('' if private_library else 'pyldb.h'), + public_headers_install=not private_library, + vnum=VERSION, + private_library=private_library, + pc_files='pyldb-util.pc', + pyembed=True, + enabled=bld.PYTHON_BUILD_IS_ENABLED(), + abi_directory='ABI', + abi_match='pyldb_*') - name = bld.pyembed_libname('pyldb-util') - bld.SAMBA_LIBRARY(name, - deps='replace ldb', - source='pyldb_util.c', - public_headers=('' if private_library else 'pyldb.h'), - public_headers_install=not private_library, - vnum=VERSION, - private_library=private_library, - pc_files='pyldb-util.pc', - pyembed=True, - enabled=bld.PYTHON_BUILD_IS_ENABLED(), - abi_directory='ABI', - abi_match='pyldb_*') - - if not bld.CONFIG_SET('USING_SYSTEM_LDB'): - bld.SAMBA_PYTHON('pyldb', 'pyldb.c', - deps='replace ldb ' + name, - realname='ldb.so', - cflags='-DPACKAGE_VERSION=\"%s\"' % VERSION) + if not bld.CONFIG_SET('USING_SYSTEM_LDB'): + bld.SAMBA_PYTHON('pyldb', 'pyldb.c', + deps='replace ldb ' + name, + realname='ldb.so', + cflags='-DPACKAGE_VERSION=\"%s\"' % VERSION) # Do only install this file as part of the Samba build if we do not # use the system libldb! if not bld.CONFIG_SET('USING_SYSTEM_PYLDB_UTIL'): - for env in bld.gen_python_environments(['PKGCONFIGDIR']): - bld.SAMBA_SCRIPT('_ldb_text.py', - pattern='_ldb_text.py', - installdir='python') + bld.SAMBA_SCRIPT('_ldb_text.py', + pattern='_ldb_text.py', + installdir='python') - bld.INSTALL_FILES('${PYTHONARCHDIR}', '_ldb_text.py') + bld.INSTALL_FILES('${PYTHONARCHDIR}', '_ldb_text.py') if not bld.CONFIG_SET('USING_SYSTEM_LDB'): if bld.is_install: diff --git a/lib/talloc/wscript b/lib/talloc/wscript index eb68279638b..81d12f8c054 100644 --- a/lib/talloc/wscript +++ b/lib/talloc/wscript @@ -133,10 +133,9 @@ def build(bld): manpages='man/talloc.3') if not bld.CONFIG_SET('USING_SYSTEM_PYTALLOC_UTIL'): - for env in bld.gen_python_environments(['PKGCONFIGDIR']): - name = bld.pyembed_libname('pytalloc-util') + name = bld.pyembed_libname('pytalloc-util') - bld.SAMBA_LIBRARY(name, + bld.SAMBA_LIBRARY(name, source='pytalloc_util.c', public_deps='talloc', pyembed=True, @@ -149,18 +148,18 @@ def build(bld): 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('pytalloc', + 'pytalloc.c', + deps='talloc ' + name, + enabled=bld.PYTHON_BUILD_IS_ENABLED(), + realname='talloc.so') - bld.SAMBA_PYTHON('test_pytalloc', - 'test_pytalloc.c', - deps=name, - enabled=bld.PYTHON_BUILD_IS_ENABLED(), - realname='_test_pytalloc.so', - install=False) + bld.SAMBA_PYTHON('test_pytalloc', + 'test_pytalloc.c', + deps=name, + enabled=bld.PYTHON_BUILD_IS_ENABLED(), + realname='_test_pytalloc.so', + install=False) def test(ctx): diff --git a/lib/tdb/wscript b/lib/tdb/wscript index d4f2e88e279..c616b40fbe5 100644 --- a/lib/tdb/wscript +++ b/lib/tdb/wscript @@ -182,21 +182,19 @@ def build(bld): includes='include', install=False) if not bld.CONFIG_SET('USING_SYSTEM_PYTDB'): - 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) + bld.SAMBA_PYTHON('pytdb', + 'pytdb.c', + deps='tdb', + enabled=not bld.env.disable_python, + realname='tdb.so', + cflags='-DPACKAGE_VERSION=\"%s\"' % VERSION) 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.SAMBA_SCRIPT('_tdb_text.py', + pattern='_tdb_text.py', + installdir='python') + + bld.INSTALL_FILES('${PYTHONARCHDIR}', '_tdb_text.py') def testonly(ctx): '''run tdb testsuite''' diff --git a/lib/tevent/wscript b/lib/tevent/wscript index ce6e12f4792..a9288add0a3 100644 --- a/lib/tevent/wscript +++ b/lib/tevent/wscript @@ -114,15 +114,14 @@ def build(bld): private_library=private_library) if not bld.CONFIG_SET('USING_SYSTEM_PYTEVENT') and not bld.env.disable_python: - for env in bld.gen_python_environments(['PKGCONFIGDIR']): - bld.SAMBA_PYTHON('_tevent', - 'pytevent.c', - deps='tevent', - realname='_tevent.so', - cflags='-DPACKAGE_VERSION=\"%s\"' % VERSION) + bld.SAMBA_PYTHON('_tevent', + 'pytevent.c', + deps='tevent', + realname='_tevent.so', + cflags='-DPACKAGE_VERSION=\"%s\"' % VERSION) - bld.INSTALL_WILDCARD('${PYTHONARCHDIR}', 'tevent.py', flat=False) + bld.INSTALL_WILDCARD('${PYTHONARCHDIR}', 'tevent.py', flat=False) # install out various python scripts for use by make test bld.SAMBA_SCRIPT('tevent_python', diff --git a/libcli/nbt/wscript_build b/libcli/nbt/wscript_build index e965a347204..090789ce99a 100644 --- a/libcli/nbt/wscript_build +++ b/libcli/nbt/wscript_build @@ -24,8 +24,7 @@ bld.SAMBA_BINARY('nmblookup' + bld.env.suffix4, install=False ) -for env in bld.gen_python_environments(): - bld.SAMBA_PYTHON('python_netbios', +bld.SAMBA_PYTHON('python_netbios', source='pynbt.c', public_deps='cli-nbt DYNCONFIG samba-hostconfig', realname='samba/netbios.so' diff --git a/libcli/security/wscript_build b/libcli/security/wscript_build index 6a6b0129d14..ebbf79a19ba 100644 --- a/libcli/security/wscript_build +++ b/libcli/security/wscript_build @@ -7,10 +7,9 @@ bld.SAMBA_LIBRARY('samba-security', deps='talloc ndr NDR_SECURITY' ) -for env in bld.gen_python_environments(): - pytalloc_util = bld.pyembed_libname('pytalloc-util') - bld.SAMBA_PYTHON('pysecurity', - source='pysecurity.c', - deps='samba-security %s' % pytalloc_util, - realname='samba/security.so' - ) +pytalloc_util = bld.pyembed_libname('pytalloc-util') +bld.SAMBA_PYTHON('pysecurity', + source='pysecurity.c', + deps='samba-security %s' % pytalloc_util, + realname='samba/security.so' + ) diff --git a/libcli/util/wscript_build b/libcli/util/wscript_build index ce918993d15..9713c9d5d70 100644 --- a/libcli/util/wscript_build +++ b/libcli/util/wscript_build @@ -26,14 +26,13 @@ bld.SAMBA_GENERATOR('werror_generated', rule='${PYTHON} ${SRC[0].abspath(env)} ${SRC[1].abspath(env)} ${TGT[0].abspath(env)} ${TGT[1].abspath(env)} ${TGT[2].abspath(env)}' ) -for env in bld.gen_python_environments(): - bld.SAMBA_PYTHON('python_ntstatus', +bld.SAMBA_PYTHON('python_ntstatus', source='py_ntstatus.c', deps='samba-errors', realname='samba/ntstatus.so' ) - bld.SAMBA_PYTHON('python_werror', +bld.SAMBA_PYTHON('python_werror', source='py_werror.c', deps='samba-errors', realname='samba/werror.so' diff --git a/libgpo/wscript_build b/libgpo/wscript_build index 6c412275958..f36ccf2c701 100644 --- a/libgpo/wscript_build +++ b/libgpo/wscript_build @@ -14,9 +14,8 @@ bld.SAMBA3_LIBRARY('gpext', deps='talloc ads TOKEN_UTIL auth gpo', private_library=True) -for env in bld.gen_python_environments(): - pyparam_util = bld.pyembed_libname('pyparam_util') - pyrpc_util = bld.pyembed_libname('pyrpc_util') - bld.SAMBA3_PYTHON('python_samba_libgpo', 'pygpo.c', - deps='%s gpext talloc ads TOKEN_UTIL auth %s' % (pyparam_util, pyrpc_util), - realname='samba/gpo.so') +pyparam_util = bld.pyembed_libname('pyparam_util') +pyrpc_util = bld.pyembed_libname('pyrpc_util') +bld.SAMBA3_PYTHON('python_samba_libgpo', 'pygpo.c', + deps='%s gpext talloc ads TOKEN_UTIL auth %s' % (pyparam_util, pyrpc_util), + realname='samba/gpo.so') diff --git a/python/wscript b/python/wscript index 9012b5077a0..916031896d3 100644 --- a/python/wscript +++ b/python/wscript @@ -44,42 +44,40 @@ def configure(conf): def build(bld): - for env in bld.gen_python_environments(): - pytalloc_util = bld.pyembed_libname('pytalloc-util') - pyparam_util = bld.pyembed_libname('pyparam_util') - libpython = bld.pyembed_libname('LIBPYTHON') - pyrpc_util = bld.pyembed_libname('pyrpc_util') - samba_python = bld.pyembed_libname('samba_python') - bld.SAMBA_LIBRARY(samba_python, + pytalloc_util = bld.pyembed_libname('pytalloc-util') + pyparam_util = bld.pyembed_libname('pyparam_util') + libpython = bld.pyembed_libname('LIBPYTHON') + pyrpc_util = bld.pyembed_libname('pyrpc_util') + samba_python = bld.pyembed_libname('samba_python') + bld.SAMBA_LIBRARY(samba_python, source=[], deps='%s %s %s' % (libpython, pytalloc_util, pyrpc_util), grouping_library=True, private_library=True, pyembed=True, enabled=bld.PYTHON_BUILD_IS_ENABLED()) - bld.SAMBA_PYTHON('python_glue', - source='pyglue.c', - deps=''' + bld.SAMBA_PYTHON('python_glue', + source='pyglue.c', + deps=''' %s samba-util netif %s ''' % (pyparam_util, pytalloc_util), - realname='samba/_glue.so') + realname='samba/_glue.so') - bld.SAMBA_SUBSYSTEM(libpython, - source='modules.c', - public_deps='', - init_function_sentinel='{NULL,NULL}', - deps='talloc', - pyext=True, - enabled=bld.PYTHON_BUILD_IS_ENABLED()) + bld.SAMBA_SUBSYSTEM(libpython, + source='modules.c', + public_deps='', + init_function_sentinel='{NULL,NULL}', + deps='talloc', + pyext=True, + enabled=bld.PYTHON_BUILD_IS_ENABLED()) if bld.PYTHON_BUILD_IS_ENABLED(): - for env in bld.gen_python_environments(): - # install out various python scripts for use by make test - bld.SAMBA_SCRIPT('samba_python_files', - pattern='samba/**/*.py', - installdir='python') - - bld.INSTALL_WILDCARD('${PYTHONARCHDIR}', 'samba/**/*.py', flat=False) + # install out various python scripts for use by make test + bld.SAMBA_SCRIPT('samba_python_files', + pattern='samba/**/*.py', + installdir='python') + + bld.INSTALL_WILDCARD('${PYTHONARCHDIR}', 'samba/**/*.py', flat=False) diff --git a/source3/param/wscript_build b/source3/param/wscript_build index d999d0b89f2..8a374c466c0 100644 --- a/source3/param/wscript_build +++ b/source3/param/wscript_build @@ -14,9 +14,8 @@ bld.SAMBA_GENERATOR('s3_param_proto_h', group='build_source', rule='${PYTHON} ${SRC[0].abspath(env)} --file ${SRC[1].abspath(env)} --output ${TGT} --mode=S3PROTO') -for env in bld.gen_python_environments(): - pytalloc_util = bld.pyembed_libname('pytalloc-util') - bld.SAMBA3_PYTHON('pys3param', +pytalloc_util = bld.pyembed_libname('pytalloc-util') +bld.SAMBA3_PYTHON('pys3param', source='pyparam.c', deps='smbconf', public_deps=' '.join(['samba-hostconfig', pytalloc_util, 'talloc']), diff --git a/source3/passdb/wscript_build b/source3/passdb/wscript_build index 2a35392f209..faa0cc4b495 100644 --- a/source3/passdb/wscript_build +++ b/source3/passdb/wscript_build @@ -32,10 +32,9 @@ bld.SAMBA3_MODULE('pdb_samba_dsdb', internal_module=bld.SAMBA3_IS_STATIC_MODULE('pdb_samba_dsdb') and bld.AD_DC_BUILD_IS_ENABLED(), enabled=bld.SAMBA3_IS_ENABLED_MODULE('pdb_samba_dsdb') and bld.AD_DC_BUILD_IS_ENABLED()) -for env in bld.gen_python_environments(): - pyrpc_util = bld.pyembed_libname('pyrpc_util') - pytalloc_util = bld.pyembed_libname('pytalloc-util') - bld.SAMBA3_PYTHON('pypassdb', +pyrpc_util = bld.pyembed_libname('pyrpc_util') +pytalloc_util = bld.pyembed_libname('pytalloc-util') +bld.SAMBA3_PYTHON('pypassdb', source='py_passdb.c', deps='pdb', public_deps=' '.join(['samba-util', 'tdb', 'talloc', pyrpc_util, pytalloc_util]), diff --git a/source3/wscript_build b/source3/wscript_build index f595b8ecfc0..317896eee46 100644 --- a/source3/wscript_build +++ b/source3/wscript_build @@ -1316,18 +1316,16 @@ bld.SAMBA3_BINARY('vlp', install=False) -for env in bld.gen_python_environments(): - pyrpc_util = bld.pyembed_libname('pyrpc_util') - pytalloc_util = bld.pyembed_libname('pytalloc-util') - bld.SAMBA3_PYTHON('pysmbd', +pyrpc_util = bld.pyembed_libname('pyrpc_util') +pytalloc_util = bld.pyembed_libname('pytalloc-util') +bld.SAMBA3_PYTHON('pysmbd', source='smbd/pysmbd.c', deps=' '.join(['smbd_base', pyrpc_util, pytalloc_util]), realname='samba/samba3/smbd.so' ) -for env in bld.gen_python_environments(): - pycredentials = 'pycredentials' - bld.SAMBA3_PYTHON('pylibsmb', +pycredentials = 'pycredentials' +bld.SAMBA3_PYTHON('pylibsmb', source='libsmb/pylibsmb.c', deps='smbclient samba-credentials %s' % pycredentials, realname='samba/samba3/libsmb_samba_internal.so' diff --git a/source4/auth/gensec/wscript_build b/source4/auth/gensec/wscript_build index f9889d278a3..d14a50ff273 100644 --- a/source4/auth/gensec/wscript_build +++ b/source4/auth/gensec/wscript_build @@ -27,12 +27,11 @@ bld.SAMBA_MODULE('gensec_gssapi', ) -for env in bld.gen_python_environments(): - pytalloc_util = bld.pyembed_libname('pytalloc-util') - pyparam_util = bld.pyembed_libname('pyparam_util') +pytalloc_util = bld.pyembed_libname('pytalloc-util') +pyparam_util = bld.pyembed_libname('pyparam_util') - bld.SAMBA_PYTHON('pygensec', - source='pygensec.c', - deps='gensec %s %s' % (pytalloc_util, pyparam_util), - realname='samba/gensec.so' - ) +bld.SAMBA_PYTHON('pygensec', + source='pygensec.c', + deps='gensec %s %s' % (pytalloc_util, pyparam_util), + realname='samba/gensec.so' + ) diff --git a/source4/auth/wscript_build b/source4/auth/wscript_build index 7f42042e05b..daf5c8a422d 100644 --- a/source4/auth/wscript_build +++ b/source4/auth/wscript_build @@ -49,15 +49,14 @@ bld.SAMBA_BINARY('test_kerberos', install=False ) -for env in bld.gen_python_environments(): - pytalloc_util = bld.pyembed_libname('pytalloc-util') - pyparam_util = bld.pyembed_libname('pyparam_util') - pyldb_util = bld.pyembed_libname('pyldb-util') - pycredentials = 'pycredentials' - bld.SAMBA_PYTHON('pyauth', - source='pyauth.c', - public_deps='auth_system_session', - deps='samdb %s %s %s %s auth4' % (pytalloc_util, pyparam_util, pyldb_util, pycredentials), - realname='samba/auth.so' - ) +pytalloc_util = bld.pyembed_libname('pytalloc-util') +pyparam_util = bld.pyembed_libname('pyparam_util') +pyldb_util = bld.pyembed_libname('pyldb-util') +pycredentials = 'pycredentials' +bld.SAMBA_PYTHON('pyauth', + source='pyauth.c', + public_deps='auth_system_session', + deps='samdb %s %s %s %s auth4' % (pytalloc_util, pyparam_util, pyldb_util, pycredentials), + realname='samba/auth.so' + ) diff --git a/source4/dns_server/wscript_build b/source4/dns_server/wscript_build index 0fd6aa80339..8a8466d096f 100644 --- a/source4/dns_server/wscript_build +++ b/source4/dns_server/wscript_build @@ -75,14 +75,13 @@ bld.SAMBA_LIBRARY('dlz_bind9_for_torture', deps='samba-hostconfig samdb-common gensec popt dnsserver_common', enabled=bld.AD_DC_BUILD_IS_ENABLED()) -for env in bld.gen_python_environments(): - pyldb_util = bld.pyembed_libname('pyldb-util') - pyrpc_util = bld.pyembed_libname('pyrpc_util') - pytalloc_util = bld.pyembed_libname('pytalloc-util') +pyldb_util = bld.pyembed_libname('pyldb-util') +pyrpc_util = bld.pyembed_libname('pyrpc_util') +pytalloc_util = bld.pyembed_libname('pytalloc-util') - bld.SAMBA_PYTHON('python_dsdb_dns', - source='pydns.c', - deps='samdb %s %s dnsserver_common %s' % ( - pyldb_util, pyrpc_util, pytalloc_util), - realname='samba/dsdb_dns.so', - enabled=bld.AD_DC_BUILD_IS_ENABLED()) +bld.SAMBA_PYTHON('python_dsdb_dns', + source='pydns.c', + deps='samdb %s %s dnsserver_common %s' % ( + pyldb_util, pyrpc_util, pytalloc_util), + realname='samba/dsdb_dns.so', + enabled=bld.AD_DC_BUILD_IS_ENABLED()) diff --git a/source4/dsdb/wscript_build b/source4/dsdb/wscript_build index 34ba8edb44a..dbe58859a14 100644 --- a/source4/dsdb/wscript_build +++ b/source4/dsdb/wscript_build @@ -69,17 +69,16 @@ bld.SAMBA_MODULE('service_dns_update', enabled=bld.AD_DC_BUILD_IS_ENABLED() ) -for env in bld.gen_python_environments(): - pyldb_util = bld.pyembed_libname('pyldb-util') - pyrpc_util = bld.pyembed_libname('pyrpc_util') - pyparam_util = bld.pyembed_libname('pyparam_util') - bld.SAMBA_PYTHON('python_dsdb', - source='pydsdb.c', - # the dependency on dcerpc here is because gensec - # depends on dcerpc but the waf circular dependency finder - # removes it so we end up with unresolved symbols. - deps='samdb %s dcerpc com_err %s %s dsdb_garbage_collect_tombstones scavenge_dns_records' %\ - (pyldb_util, pyrpc_util, pyparam_util), - realname='samba/dsdb.so', - enabled=bld.AD_DC_BUILD_IS_ENABLED() - ) +pyldb_util = bld.pyembed_libname('pyldb-util') +pyrpc_util = bld.pyembed_libname('pyrpc_util') +pyparam_util = bld.pyembed_libname('pyparam_util') +bld.SAMBA_PYTHON('python_dsdb', + source='pydsdb.c', + # the dependency on dcerpc here is because gensec + # depends on dcerpc but the waf circular dependency finder + # removes it so we end up with unresolved symbols. + deps='samdb %s dcerpc com_err %s %s dsdb_garbage_collect_tombstones scavenge_dns_records' %\ + (pyldb_util, pyrpc_util, pyparam_util), + realname='samba/dsdb.so', + enabled=bld.AD_DC_BUILD_IS_ENABLED() + ) diff --git a/source4/lib/messaging/wscript_build b/source4/lib/messaging/wscript_build index 878ff647425..4688aa7bda4 100644 --- a/source4/lib/messaging/wscript_build +++ b/source4/lib/messaging/wscript_build @@ -13,12 +13,10 @@ bld.SAMBA_LIBRARY('MESSAGING', private_library=True ) -for env in bld.gen_python_environments(): +pyparam_util = bld.pyembed_libname('pyparam_util') +pytalloc_util = bld.pyembed_libname('pytalloc-util') - pyparam_util = bld.pyembed_libname('pyparam_util') - pytalloc_util = bld.pyembed_libname('pytalloc-util') - - bld.SAMBA_PYTHON('python_messaging', +bld.SAMBA_PYTHON('python_messaging', source='pymessaging.c', deps='MESSAGING events %s %s' % (pyparam_util, pytalloc_util), realname='samba/messaging.so' diff --git a/source4/lib/policy/wscript_build b/source4/lib/policy/wscript_build index fa270887bd4..027d4bef0b6 100644 --- a/source4/lib/policy/wscript_build +++ b/source4/lib/policy/wscript_build @@ -2,11 +2,10 @@ -for env in bld.gen_python_environments(): - pytalloc_util = bld.pyembed_libname('pytalloc-util') - samba_policy = bld.pyembed_libname('samba-policy') - samba_net = bld.pyembed_libname('samba-net') - bld.SAMBA_LIBRARY(samba_policy, +pytalloc_util = bld.pyembed_libname('pytalloc-util') +samba_policy = bld.pyembed_libname('samba-policy') +samba_net = bld.pyembed_libname('samba-net') +bld.SAMBA_LIBRARY(samba_policy, source='gp_ldap.c gp_filesys.c gp_manage.c gp_ini.c', pc_files='samba-policy.pc', public_deps='ldb %s' % samba_net, @@ -15,9 +14,9 @@ for env in bld.gen_python_environments(): public_headers='policy.h', enabled=bld.PYTHON_BUILD_IS_ENABLED() ) - bld.SAMBA_PYTHON( +bld.SAMBA_PYTHON( 'py_policy', source='pypolicy.c', public_deps='%s %s' % (samba_policy, pytalloc_util), realname='samba/policy.so' - ) + ) diff --git a/source4/lib/registry/wscript_build b/source4/lib/registry/wscript_build index 06508fb38d5..46040291dc3 100644 --- a/source4/lib/registry/wscript_build +++ b/source4/lib/registry/wscript_build @@ -59,11 +59,10 @@ bld.SAMBA_SUBSYSTEM('torture_registry', deps='torture registry' ) -for env in bld.gen_python_environments(): - pytalloc_util = bld.pyembed_libname('pytalloc-util') - pyparam_util = bld.pyembed_libname('pyparam_util') +pytalloc_util = bld.pyembed_libname('pytalloc-util') +pyparam_util = bld.pyembed_libname('pyparam_util') - bld.SAMBA_PYTHON('py_registry', +bld.SAMBA_PYTHON('py_registry', source='pyregistry.c', public_deps='registry %s %s' % (pytalloc_util, pyparam_util), realname='samba/registry.so' diff --git a/source4/libnet/wscript_build b/source4/libnet/wscript_build index 25c15d7aa0b..3f36e4aa3aa 100644 --- a/source4/libnet/wscript_build +++ b/source4/libnet/wscript_build @@ -1,29 +1,28 @@ #!/usr/bin/env python -for env in bld.gen_python_environments(): - pytalloc_util = bld.pyembed_libname('pytalloc-util') - pyrpc_util = bld.pyembed_libname('pyrpc_util') - provision = bld.pyembed_libname('PROVISION') - name = bld.pyembed_libname('samba-net') - auto_proto='libnet_proto.h' - bld.SAMBA_LIBRARY(name, - source='libnet.c libnet_passwd.c libnet_time.c libnet_rpc.c libnet_join.c libnet_site.c libnet_become_dc.c libnet_unbecome_dc.c libnet_vampire.c libnet_samdump.c libnet_samsync_ldb.c libnet_user.c libnet_group.c libnet_share.c libnet_lookup.c libnet_domain.c userinfo.c groupinfo.c userman.c groupman.c prereq_domain.c libnet_samsync.c', - autoproto=auto_proto, - public_deps='samba-credentials dcerpc dcerpc-samr RPC_NDR_LSA RPC_NDR_SRVSVC RPC_NDR_DRSUAPI cli_composite LIBCLI_RESOLVE LIBCLI_FINDDCS cli_cldap LIBCLI_FINDDCS gensec_schannel LIBCLI_AUTH ndr smbpasswdparser %s LIBCLI_SAMSYNC LIBTSOCKET' % (provision), - private_library=True, - pyembed=True, - enabled=bld.PYTHON_BUILD_IS_ENABLED() - ) +pytalloc_util = bld.pyembed_libname('pytalloc-util') +pyrpc_util = bld.pyembed_libname('pyrpc_util') +provision = bld.pyembed_libname('PROVISION') +name = bld.pyembed_libname('samba-net') +auto_proto='libnet_proto.h' +bld.SAMBA_LIBRARY(name, + source='libnet.c libnet_passwd.c libnet_time.c libnet_rpc.c libnet_join.c libnet_site.c libnet_become_dc.c libnet_unbecome_dc.c libnet_vampire.c libnet_samdump.c libnet_samsync_ldb.c libnet_user.c libnet_group.c libnet_share.c libnet_lookup.c libnet_domain.c userinfo.c groupinfo.c userman.c groupman.c prereq_domain.c libnet_samsync.c', + autoproto=auto_proto, + public_deps='samba-credentials dcerpc dcerpc-samr RPC_NDR_LSA RPC_NDR_SRVSVC RPC_NDR_DRSUAPI cli_composite LIBCLI_RESOLVE LIBCLI_FINDDCS cli_cldap LIBCLI_FINDDCS gensec_schannel LIBCLI_AUTH ndr smbpasswdparser %s LIBCLI_SAMSYNC LIBTSOCKET' % (provision), + private_library=True, + pyembed=True, + enabled=bld.PYTHON_BUILD_IS_ENABLED() + ) - bld.SAMBA_PYTHON('python_net', - source='py_net.c', - deps='%s %s %s' % (name, pyrpc_util, pytalloc_util), - realname='samba/net.so' - ) +bld.SAMBA_PYTHON('python_net', + source='py_net.c', + deps='%s %s %s' % (name, pyrpc_util, pytalloc_util), + realname='samba/net.so' + ) - bld.SAMBA_PYTHON('python_dckeytab', - source='py_net_dckeytab.c libnet_export_keytab.c', - deps='%s db-glue krb5 com_err' % (pyrpc_util), - realname='samba/dckeytab.so', - enabled=bld.CONFIG_SET('AD_DC_BUILD_IS_ENABLED') - ) +bld.SAMBA_PYTHON('python_dckeytab', + source='py_net_dckeytab.c libnet_export_keytab.c', + deps='%s db-glue krb5 com_err' % (pyrpc_util), + realname='samba/dckeytab.so', + enabled=bld.CONFIG_SET('AD_DC_BUILD_IS_ENABLED') + ) diff --git a/source4/librpc/wscript_build b/source4/librpc/wscript_build index 48ba1151a69..a282bcec1cd 100644 --- a/source4/librpc/wscript_build +++ b/source4/librpc/wscript_build @@ -176,301 +176,300 @@ gen_cflags = '' if bld.CONFIG_SET('HAVE_WNO_UNUSED_FUNCTION'): gen_cflags = '-Wno-unused-function' -for env in bld.gen_python_environments(): - pyrpc_util = bld.pyembed_libname('pyrpc_util') - pytalloc_util = bld.pyembed_libname('pytalloc-util') - pyparam_util = bld.pyembed_libname('pyparam_util') +pyrpc_util = bld.pyembed_libname('pyrpc_util') +pytalloc_util = bld.pyembed_libname('pytalloc-util') +pyparam_util = bld.pyembed_libname('pyparam_util') - bld.SAMBA_SUBSYSTEM(pyrpc_util, - source='rpc/pyrpc_util.c', - public_deps='%s %s dcerpc MESSAGING' % (pytalloc_util, pyparam_util), - pyext=True, - enabled=bld.PYTHON_BUILD_IS_ENABLED(), - ) +bld.SAMBA_SUBSYSTEM(pyrpc_util, + source='rpc/pyrpc_util.c', + public_deps='%s %s dcerpc MESSAGING' % (pytalloc_util, pyparam_util), + pyext=True, + enabled=bld.PYTHON_BUILD_IS_ENABLED(), + ) - bld.SAMBA_PYTHON('python_dcerpc', - source='rpc/pyrpc.c', - public_deps='LIBCLI_SMB samba-util samba-hostconfig dcerpc-samr RPC_NDR_LSA DYNCONFIG %s gensec' % pyrpc_util, - realname='samba/dcerpc/base.so', - cflags_end=gen_cflags - ) +bld.SAMBA_PYTHON('python_dcerpc', + source='rpc/pyrpc.c', + public_deps='LIBCLI_SMB samba-util samba-hostconfig dcerpc-samr RPC_NDR_LSA DYNCONFIG %s gensec' % pyrpc_util, + realname='samba/dcerpc/base.so', + cflags_end=gen_cflags + ) - bld.SAMBA_PYTHON('python_dcerpc_misc', - source='../../librpc/gen_ndr/py_misc.c', - deps='%s %s ndr-krb5pac' % (pytalloc_util, pyrpc_util), - realname='samba/dcerpc/misc.so', - cflags_end=gen_cflags - ) +bld.SAMBA_PYTHON('python_dcerpc_misc', + source='../../librpc/gen_ndr/py_misc.c', + deps='%s %s ndr-krb5pac' % (pytalloc_util, pyrpc_util), + realname='samba/dcerpc/misc.so', + cflags_end=gen_cflags + ) - bld.SAMBA_PYTHON('python_auth', - source='../../librpc/gen_ndr/py_auth.c', - deps='NDR_AUTH %s %s' % (pytalloc_util, pyrpc_util), - realname='samba/dcerpc/auth.so', - cflags_end=gen_cflags - ) +bld.SAMBA_PYTHON('python_auth', + source='../../librpc/gen_ndr/py_auth.c', + deps='NDR_AUTH %s %s' % (pytalloc_util, pyrpc_util), + realname='samba/dcerpc/auth.so', + cflags_end=gen_cflags + ) - bld.SAMBA_PYTHON('python_dcerpc_security', - source='../../librpc/gen_ndr/py_security.c', - deps='%s %s NDR_SECURITY' % (pytalloc_util, pyrpc_util), - realname='samba/dcerpc/security.so', - cflags_end=gen_cflags - ) +bld.SAMBA_PYTHON('python_dcerpc_security', + source='../../librpc/gen_ndr/py_security.c', + deps='%s %s NDR_SECURITY' % (pytalloc_util, pyrpc_util), + realname='samba/dcerpc/security.so', + cflags_end=gen_cflags + ) - bld.SAMBA_PYTHON('python_lsa', - source='../../librpc/gen_ndr/py_lsa.c', - deps='RPC_NDR_LSA %s %s' % (pytalloc_util, pyrpc_util), - realname='samba/dcerpc/lsa.so', - cflags_end=gen_cflags - ) +bld.SAMBA_PYTHON('python_lsa', + source='../../librpc/gen_ndr/py_lsa.c', + deps='RPC_NDR_LSA %s %s' % (pytalloc_util, pyrpc_util), + realname='samba/dcerpc/lsa.so', + cflags_end=gen_cflags + ) - bld.SAMBA_PYTHON('python_krb5pac', - source='../../librpc/gen_ndr/py_krb5pac.c', - deps='ndr-krb5pac %s %s' % (pytalloc_util, pyrpc_util), - realname='samba/dcerpc/krb5pac.so', - cflags_end=gen_cflags - ) +bld.SAMBA_PYTHON('python_krb5pac', + source='../../librpc/gen_ndr/py_krb5pac.c', + deps='ndr-krb5pac %s %s' % (pytalloc_util, pyrpc_util), + realname='samba/dcerpc/krb5pac.so', + cflags_end=gen_cflags + ) - bld.SAMBA_PYTHON('python_netlogon', - source='../../librpc/gen_ndr/py_netlogon.c', - deps='RPC_NDR_NETLOGON %s %s' % (pytalloc_util, pyrpc_util), - realname='samba/dcerpc/netlogon.so', - cflags_end=gen_cflags - ) +bld.SAMBA_PYTHON('python_netlogon', + source='../../librpc/gen_ndr/py_netlogon.c', + deps='RPC_NDR_NETLOGON %s %s' % (pytalloc_util, pyrpc_util), + realname='samba/dcerpc/netlogon.so', + cflags_end=gen_cflags + ) - bld.SAMBA_PYTHON('python_samr', - source='../../librpc/gen_ndr/py_samr.c', - deps='dcerpc-samr %s %s' % (pytalloc_util, pyrpc_util), - realname='samba/dcerpc/samr.so', - cflags_end=gen_cflags - ) +bld.SAMBA_PYTHON('python_samr', + source='../../librpc/gen_ndr/py_samr.c', + deps='dcerpc-samr %s %s' % (pytalloc_util, pyrpc_util), + realname='samba/dcerpc/samr.so', + cflags_end=gen_cflags + ) - bld.SAMBA_PYTHON('python_spoolss', - source='../../librpc/gen_ndr/py_spoolss.c', - deps='RPC_NDR_SPOOLSS %s %s' % (pytalloc_util, pyrpc_util), - realname='samba/dcerpc/spoolss.so' - ) +bld.SAMBA_PYTHON('python_spoolss', + source='../../librpc/gen_ndr/py_spoolss.c', + deps='RPC_NDR_SPOOLSS %s %s' % (pytalloc_util, pyrpc_util), + realname='samba/dcerpc/spoolss.so' + ) - bld.SAMBA_PYTHON('python_winspool', - source='../../librpc/gen_ndr/py_winspool.c', - deps='RPC_NDR_WINSPOOL %s %s' % (pytalloc_util, pyrpc_util), - realname='samba/dcerpc/winspool.so' - ) +bld.SAMBA_PYTHON('python_winspool', + source='../../librpc/gen_ndr/py_winspool.c', + deps='RPC_NDR_WINSPOOL %s %s' % (pytalloc_util, pyrpc_util), + realname='samba/dcerpc/winspool.so' + ) - bld.SAMBA_PYTHON('python_witness', - source='../../librpc/gen_ndr/py_witness.c', - deps='RPC_NDR_WITNESS %s %s' % (pytalloc_util, pyrpc_util), - realname='samba/dcerpc/witness.so' - ) +bld.SAMBA_PYTHON('python_witness', + source='../../librpc/gen_ndr/py_witness.c', + deps='RPC_NDR_WITNESS %s %s' % (pytalloc_util, pyrpc_util), + realname='samba/dcerpc/witness.so' + ) - bld.SAMBA_PYTHON('python_dcerpc_nbt', - source='../../librpc/gen_ndr/py_nbt.c', - deps='ndr_nbt RPC_NDR_NBT %s %s' % (pytalloc_util, pyrpc_util), - realname='samba/dcerpc/nbt.so', - cflags_end=gen_cflags - ) +bld.SAMBA_PYTHON('python_dcerpc_nbt', + source='../../librpc/gen_ndr/py_nbt.c', + deps='ndr_nbt RPC_NDR_NBT %s %s' % (pytalloc_util, pyrpc_util), + realname='samba/dcerpc/nbt.so', + cflags_end=gen_cflags + ) - bld.SAMBA_PYTHON('python_dcerpc_drsblobs', - source='../../librpc/gen_ndr/py_drsblobs.c', - deps='%s %s NDR_SECURITY RPC_NDR_DRSBLOBS' % (pytalloc_util, pyrpc_util), - realname='samba/dcerpc/drsblobs.so', - cflags_end=gen_cflags - ) +bld.SAMBA_PYTHON('python_dcerpc_drsblobs', + source='../../librpc/gen_ndr/py_drsblobs.c', + deps='%s %s NDR_SECURITY RPC_NDR_DRSBLOBS' % (pytalloc_util, pyrpc_util), + realname='samba/dcerpc/drsblobs.so', + cflags_end=gen_cflags + ) - bld.SAMBA_PYTHON('python_dcerpc_ntlmssp', - source='../../librpc/gen_ndr/py_ntlmssp.c', - deps='%s %s RPC_NDR_NTLMSSP' % (pytalloc_util, pyrpc_util), - realname='samba/dcerpc/ntlmssp.so', - cflags_end=gen_cflags - ) +bld.SAMBA_PYTHON('python_dcerpc_ntlmssp', + source='../../librpc/gen_ndr/py_ntlmssp.c', + deps='%s %s RPC_NDR_NTLMSSP' % (pytalloc_util, pyrpc_util), + realname='samba/dcerpc/ntlmssp.so', + cflags_end=gen_cflags + ) - bld.SAMBA_PYTHON('python_srvsvc', - source='../../librpc/gen_ndr/py_srvsvc.c', - deps='RPC_NDR_SRVSVC %s %s' % (pytalloc_util, pyrpc_util), - realname='samba/dcerpc/srvsvc.so', - cflags_end=gen_cflags - ) +bld.SAMBA_PYTHON('python_srvsvc', + source='../../librpc/gen_ndr/py_srvsvc.c', + deps='RPC_NDR_SRVSVC %s %s' % (pytalloc_util, pyrpc_util), + realname='samba/dcerpc/srvsvc.so', + cflags_end=gen_cflags + ) - bld.SAMBA_PYTHON('python_echo', - source='../../librpc/gen_ndr/py_echo.c', - deps='RPC_NDR_ECHO %s %s' % (pytalloc_util, pyrpc_util), - realname='samba/dcerpc/echo.so', - cflags_end=gen_cflags - ) +bld.SAMBA_PYTHON('python_echo', + source='../../librpc/gen_ndr/py_echo.c', + deps='RPC_NDR_ECHO %s %s' % (pytalloc_util, pyrpc_util), + realname='samba/dcerpc/echo.so', + cflags_end=gen_cflags + ) - bld.SAMBA_PYTHON('python_dns', - source='../../librpc/gen_ndr/py_dns.c', - deps='NDR_DNS %s %s' % (pytalloc_util, pyrpc_util), - realname='samba/dcerpc/dns.so', - cflags_end=gen_cflags - ) +bld.SAMBA_PYTHON('python_dns', + source='../../librpc/gen_ndr/py_dns.c', + deps='NDR_DNS %s %s' % (pytalloc_util, pyrpc_util), + realname='samba/dcerpc/dns.so', + cflags_end=gen_cflags + ) - bld.SAMBA_PYTHON('python_winreg', - source='../../librpc/gen_ndr/py_winreg.c', - deps='RPC_NDR_WINREG %s %s' % (pytalloc_util, pyrpc_util), - realname='samba/dcerpc/winreg.so', - cflags_end=gen_cflags - ) +bld.SAMBA_PYTHON('python_winreg', + source='../../librpc/gen_ndr/py_winreg.c', + deps='RPC_NDR_WINREG %s %s' % (pytalloc_util, pyrpc_util), + realname='samba/dcerpc/winreg.so', + cflags_end=gen_cflags + ) - bld.SAMBA_PYTHON('python_preg', - source='../../librpc/gen_ndr/py_preg.c', - deps='NDR_PREG %s %s' % (pytalloc_util, pyrpc_util), - realname='samba/dcerpc/preg.so', - cflags_end=gen_cflags - ) +bld.SAMBA_PYTHON('python_preg', + source='../../librpc/gen_ndr/py_preg.c', + deps='NDR_PREG %s %s' % (pytalloc_util, pyrpc_util), + realname='samba/dcerpc/preg.so', + cflags_end=gen_cflags + ) - bld.SAMBA_PYTHON('python_initshutdown', - source='../../librpc/gen_ndr/py_initshutdown.c', - deps='RPC_NDR_INITSHUTDOWN %s %s' % (pytalloc_util, pyrpc_util), - realname='samba/dcerpc/initshutdown.so', - cflags_end=gen_cflags - ) +bld.SAMBA_PYTHON('python_initshutdown', + source='../../librpc/gen_ndr/py_initshutdown.c', + deps='RPC_NDR_INITSHUTDOWN %s %s' % (pytalloc_util, pyrpc_util), + realname='samba/dcerpc/initshutdown.so', + cflags_end=gen_cflags + ) - bld.SAMBA_PYTHON('python_epmapper', - source='../../librpc/gen_ndr/py_epmapper.c', - deps='dcerpc %s %s' % (pytalloc_util, pyrpc_util), - realname='samba/dcerpc/epmapper.so', - cflags_end=gen_cflags - ) +bld.SAMBA_PYTHON('python_epmapper', + source='../../librpc/gen_ndr/py_epmapper.c', + deps='dcerpc %s %s' % (pytalloc_util, pyrpc_util), + realname='samba/dcerpc/epmapper.so', + cflags_end=gen_cflags + ) - bld.SAMBA_PYTHON('python_mgmt', - source='../../librpc/gen_ndr/py_mgmt.c', - deps='dcerpc %s %s' % (pytalloc_util, pyrpc_util), - realname='samba/dcerpc/mgmt.so', - cflags_end=gen_cflags - ) +bld.SAMBA_PYTHON('python_mgmt', + source='../../librpc/gen_ndr/py_mgmt.c', + deps='dcerpc %s %s' % (pytalloc_util, pyrpc_util), + realname='samba/dcerpc/mgmt.so', + cflags_end=gen_cflags + ) - bld.SAMBA_PYTHON('python_atsvc', - source='../../librpc/gen_ndr/py_atsvc.c', - deps='RPC_NDR_ATSVC %s %s' % (pytalloc_util, pyrpc_util), - realname='samba/dcerpc/atsvc.so', - cflags_end=gen_cflags - ) +bld.SAMBA_PYTHON('python_atsvc', + source='../../librpc/gen_ndr/py_atsvc.c', + deps='RPC_NDR_ATSVC %s %s' % (pytalloc_util, pyrpc_util), + realname='samba/dcerpc/atsvc.so', + cflags_end=gen_cflags + ) - bld.SAMBA_PYTHON('python_svcctl', - source='../../librpc/gen_ndr/py_svcctl.c', - deps='RPC_NDR_SVCCTL %s %s' % (pytalloc_util, pyrpc_util), - realname='samba/dcerpc/svcctl.so', - cflags_end=gen_cflags - ) +bld.SAMBA_PYTHON('python_svcctl', + source='../../librpc/gen_ndr/py_svcctl.c', + deps='RPC_NDR_SVCCTL %s %s' % (pytalloc_util, pyrpc_util), + realname='samba/dcerpc/svcctl.so', + cflags_end=gen_cflags + ) - bld.SAMBA_PYTHON('python_wkssvc', - source='../../librpc/gen_ndr/py_wkssvc.c', - deps='RPC_NDR_WKSSVC %s %s' % (pytalloc_util, pyrpc_util), - realname='samba/dcerpc/wkssvc.so', - cflags_end=gen_cflags - ) +bld.SAMBA_PYTHON('python_wkssvc', + source='../../librpc/gen_ndr/py_wkssvc.c', + deps='RPC_NDR_WKSSVC %s %s' % (pytalloc_util, pyrpc_util), + realname='samba/dcerpc/wkssvc.so', + cflags_end=gen_cflags + ) - bld.SAMBA_PYTHON('python_dfs', - source='../../librpc/gen_ndr/py_dfs.c', - deps='RPC_NDR_DFS %s %s' % (pytalloc_util, pyrpc_util), - realname='samba/dcerpc/dfs.so', - cflags_end=gen_cflags - ) +bld.SAMBA_PYTHON('python_dfs', + source='../../librpc/gen_ndr/py_dfs.c', + deps='RPC_NDR_DFS %s %s' % (pytalloc_util, pyrpc_util), + realname='samba/dcerpc/dfs.so', + cflags_end=gen_cflags + ) - bld.SAMBA_PYTHON('python_dcerpc_dcerpc', - source='../../librpc/gen_ndr/py_dcerpc.c', - deps='NDR_DCERPC %s %s' % (pytalloc_util, pyrpc_util), - realname='samba/dcerpc/dcerpc.so', - cflags_end=gen_cflags - ) +bld.SAMBA_PYTHON('python_dcerpc_dcerpc', + source='../../librpc/gen_ndr/py_dcerpc.c', + deps='NDR_DCERPC %s %s' % (pytalloc_util, pyrpc_util), + realname='samba/dcerpc/dcerpc.so', + cflags_end=gen_cflags + ) - bld.SAMBA_PYTHON('python_unixinfo', - source='../../librpc/gen_ndr/py_unixinfo.c', - deps='RPC_NDR_UNIXINFO %s %s' % (pytalloc_util, pyrpc_util), - realname='samba/dcerpc/unixinfo.so', - cflags_end=gen_cflags - ) +bld.SAMBA_PYTHON('python_unixinfo', + source='../../librpc/gen_ndr/py_unixinfo.c', + deps='RPC_NDR_UNIXINFO %s %s' % (pytalloc_util, pyrpc_util), + realname='samba/dcerpc/unixinfo.so', + cflags_end=gen_cflags + ) - bld.SAMBA_PYTHON('python_irpc', - source='gen_ndr/py_irpc.c', - deps='RPC_NDR_IRPC %s %s' % (pytalloc_util, pyrpc_util), - realname='samba/dcerpc/irpc.so', - cflags_end=gen_cflags - ) +bld.SAMBA_PYTHON('python_irpc', + source='gen_ndr/py_irpc.c', + deps='RPC_NDR_IRPC %s %s' % (pytalloc_util, pyrpc_util), + realname='samba/dcerpc/irpc.so', + cflags_end=gen_cflags + ) - bld.SAMBA_PYTHON('python_server_id', - source='../../librpc/gen_ndr/py_server_id.c', - deps='RPC_NDR_SERVER_ID %s %s' % (pytalloc_util, pyrpc_util), - realname='samba/dcerpc/server_id.so', - cflags_end=gen_cflags - ) +bld.SAMBA_PYTHON('python_server_id', + source='../../librpc/gen_ndr/py_server_id.c', + deps='RPC_NDR_SERVER_ID %s %s' % (pytalloc_util, pyrpc_util), + realname='samba/dcerpc/server_id.so', + cflags_end=gen_cflags + ) - python_netlogon = 'python_netlogon' - bld.SAMBA_PYTHON('python_winbind', - source='../../librpc/gen_ndr/py_winbind.c', - deps='RPC_NDR_WINBIND %s %s %s' % (pytalloc_util, pyrpc_util, python_netlogon), - realname='samba/dcerpc/winbind.so', - cflags_end=gen_cflags - ) +python_netlogon = 'python_netlogon' +bld.SAMBA_PYTHON('python_winbind', + source='../../librpc/gen_ndr/py_winbind.c', + deps='RPC_NDR_WINBIND %s %s %s' % (pytalloc_util, pyrpc_util, python_netlogon), + realname='samba/dcerpc/winbind.so', + cflags_end=gen_cflags + ) - bld.SAMBA_PYTHON('python_drsuapi', - source='../../librpc/gen_ndr/py_drsuapi.c', - deps='RPC_NDR_DRSUAPI %s %s' % (pytalloc_util, pyrpc_util), - realname='samba/dcerpc/drsuapi.so', - cflags_end=gen_cflags - ) +bld.SAMBA_PYTHON('python_drsuapi', + source='../../librpc/gen_ndr/py_drsuapi.c', + deps='RPC_NDR_DRSUAPI %s %s' % (pytalloc_util, pyrpc_util), + realname='samba/dcerpc/drsuapi.so', + cflags_end=gen_cflags + ) - bld.SAMBA_PYTHON('python_dcerpc_dnsp', - source='../../librpc/gen_ndr/py_dnsp.c', - deps='%s %s NDR_SECURITY NDR_DNSP' % (pytalloc_util, pyrpc_util), - realname='samba/dcerpc/dnsp.so', - cflags_end=gen_cflags - ) +bld.SAMBA_PYTHON('python_dcerpc_dnsp', + source='../../librpc/gen_ndr/py_dnsp.c', + deps='%s %s NDR_SECURITY NDR_DNSP' % (pytalloc_util, pyrpc_util), + realname='samba/dcerpc/dnsp.so', + cflags_end=gen_cflags + ) - bld.SAMBA_PYTHON('python_dcerpc_xattr', - source='../../librpc/gen_ndr/py_xattr.c', - deps='%s %s RPC_NDR_XATTR' % (pytalloc_util, pyrpc_util), - realname='samba/dcerpc/xattr.so', - cflags_end=gen_cflags - ) +bld.SAMBA_PYTHON('python_dcerpc_xattr', + source='../../librpc/gen_ndr/py_xattr.c', + deps='%s %s RPC_NDR_XATTR' % (pytalloc_util, pyrpc_util), + realname='samba/dcerpc/xattr.so', + cflags_end=gen_cflags + ) - bld.SAMBA_PYTHON('python_dcerpc_idmap', - source='../../librpc/gen_ndr/py_idmap.c', - deps='%s %s RPC_NDR_XATTR' % (pytalloc_util, pyrpc_util), - realname='samba/dcerpc/idmap.so', - cflags_end=gen_cflags - ) +bld.SAMBA_PYTHON('python_dcerpc_idmap', + source='../../librpc/gen_ndr/py_idmap.c', + deps='%s %s RPC_NDR_XATTR' % (pytalloc_util, pyrpc_util), + realname='samba/dcerpc/idmap.so', + cflags_end=gen_cflags + ) - bld.SAMBA_PYTHON('python_dnsserver', - source='../../librpc/gen_ndr/py_dnsserver.c', - deps='RPC_NDR_DNSSERVER %s %s' % (pytalloc_util, pyrpc_util), - realname='samba/dcerpc/dnsserver.so', - cflags_end=gen_cflags - ) +bld.SAMBA_PYTHON('python_dnsserver', + source='../../librpc/gen_ndr/py_dnsserver.c', + deps='RPC_NDR_DNSSERVER %s %s' % (pytalloc_util, pyrpc_util), + realname='samba/dcerpc/dnsserver.so', + cflags_end=gen_cflags + ) - bld.SAMBA_PYTHON('python_dcerpc_smb_acl', - source='../../librpc/gen_ndr/py_smb_acl.c', - deps='%s %s' % (pytalloc_util, pyrpc_util), - realname='samba/dcerpc/smb_acl.so', - cflags_end=gen_cflags - ) +bld.SAMBA_PYTHON('python_dcerpc_smb_acl', + source='../../librpc/gen_ndr/py_smb_acl.c', + deps='%s %s' % (pytalloc_util, pyrpc_util), + realname='samba/dcerpc/smb_acl.so', + cflags_end=gen_cflags + ) - bld.SAMBA_PYTHON('dcerpc_python_messaging', - source='../../librpc/gen_ndr/py_messaging.c', - deps='%s %s' % (pytalloc_util, pyrpc_util), - realname='samba/dcerpc/messaging.so', - cflags_end=gen_cflags - ) +bld.SAMBA_PYTHON('dcerpc_python_messaging', + source='../../librpc/gen_ndr/py_messaging.c', + deps='%s %s' % (pytalloc_util, pyrpc_util), + realname='samba/dcerpc/messaging.so', + cflags_end=gen_cflags + ) + +bld.SAMBA_PYTHON('dcerpc_windows_event_ids', + source='../../librpc/gen_ndr/py_windows_event_ids.c', + deps='%s %s' % (pytalloc_util, pyrpc_util), + realname='samba/dcerpc/windows_event_ids.so', + cflags_end=gen_cflags + ) - bld.SAMBA_PYTHON('dcerpc_windows_event_ids', - source='../../librpc/gen_ndr/py_windows_event_ids.c', - deps='%s %s' % (pytalloc_util, pyrpc_util), - realname='samba/dcerpc/windows_event_ids.so', - cflags_end=gen_cflags - ) if bld.PYTHON_BUILD_IS_ENABLED(): - for env in bld.gen_python_environments(): - bld.SAMBA_SCRIPT('python_dcerpc_init', - pattern='rpc/dcerpc.py', - installdir='python/samba/dcerpc', - installname='__init__.py') + bld.SAMBA_SCRIPT('python_dcerpc_init', + pattern='rpc/dcerpc.py', + installdir='python/samba/dcerpc', + installname='__init__.py') - bld.INSTALL_FILES('${PYTHONARCHDIR}/samba/dcerpc', 'rpc/dcerpc.py', destname='__init__.py') + bld.INSTALL_FILES('${PYTHONARCHDIR}/samba/dcerpc', 'rpc/dcerpc.py', destname='__init__.py') diff --git a/source4/ntvfs/posix/wscript_build b/source4/ntvfs/posix/wscript_build index eac2dfc68e4..96c6b35441b 100644 --- a/source4/ntvfs/posix/wscript_build +++ b/source4/ntvfs/posix/wscript_build @@ -47,22 +47,21 @@ bld.SAMBA_LIBRARY('posix_eadb', autoproto='posix_eadb_proto.h', private_library=True) -for env in bld.gen_python_environments(): - pyparam_util = bld.pyembed_libname('pyparam_util') +pyparam_util = bld.pyembed_libname('pyparam_util') - bld.SAMBA_PYTHON('python_xattr_native', +bld.SAMBA_PYTHON('python_xattr_native', source='python/pyxattr_native.c', deps='ndr ldb samdb samba-credentials %s attr' % pyparam_util, realname='samba/xattr_native.so' ) - bld.SAMBA_PYTHON('python_posix_eadb', +bld.SAMBA_PYTHON('python_posix_eadb', source='python/pyposix_eadb.c', deps='%s posix_eadb tdb' % pyparam_util, realname='samba/posix_eadb.so' ) - bld.SAMBA_PYTHON('python_xattr_tdb', +bld.SAMBA_PYTHON('python_xattr_tdb', source='python/pyxattr_tdb.c', deps='%s xattr_tdb' % pyparam_util, realname='samba/xattr_tdb.so' diff --git a/source4/param/wscript_build b/source4/param/wscript_build index cf2b7009ea1..5d237184b10 100644 --- a/source4/param/wscript_build +++ b/source4/param/wscript_build @@ -1,17 +1,16 @@ #!/usr/bin/env python -for env in bld.gen_python_environments(): - name = bld.pyembed_libname('PROVISION') - pytalloc_util = bld.pyembed_libname('pytalloc-util') - pyparam_util = bld.pyembed_libname('pyparam_util') - libpython = bld.pyembed_libname('LIBPYTHON') - - pyldb_util = bld.pyembed_libname('pyldb-util') - bld.SAMBA_SUBSYSTEM(name, - source='provision.c pyparam.c', - deps='%s %s ldb %s %s' % (libpython, pyparam_util, pytalloc_util, pyldb_util), - pyext=True, - enabled=bld.PYTHON_BUILD_IS_ENABLED(), - ) +name = bld.pyembed_libname('PROVISION') +pytalloc_util = bld.pyembed_libname('pytalloc-util') +pyparam_util = bld.pyembed_libname('pyparam_util') +libpython = bld.pyembed_libname('LIBPYTHON') + +pyldb_util = bld.pyembed_libname('pyldb-util') +bld.SAMBA_SUBSYSTEM(name, + source='provision.c pyparam.c', + deps='%s %s ldb %s %s' % (libpython, pyparam_util, pytalloc_util, pyldb_util), + pyext=True, + enabled=bld.PYTHON_BUILD_IS_ENABLED(), +) bld.SAMBA_SUBSYSTEM('share', @@ -42,23 +41,22 @@ bld.SAMBA_SUBSYSTEM('SECRETS', deps='ldb tdb-wrap util_tdb NDR_SECURITY tevent ldbwrap' ) -for env in bld.gen_python_environments(): - pytalloc_util = bld.pyembed_libname('pytalloc-util') - pyparam_util = bld.pyembed_libname('pyparam_util') - libpython = bld.pyembed_libname('LIBPYTHON') +pytalloc_util = bld.pyembed_libname('pytalloc-util') +pyparam_util = bld.pyembed_libname('pyparam_util') +libpython = bld.pyembed_libname('LIBPYTHON') - bld.SAMBA_PYTHON('pyparam', - source='pyparam.c', - deps='samba-hostconfig %s' % pytalloc_util, - realname='samba/param.so' - ) +bld.SAMBA_PYTHON('pyparam', + source='pyparam.c', + deps='samba-hostconfig %s' % pytalloc_util, + realname='samba/param.so' + ) - bld.SAMBA_SUBSYSTEM(pyparam_util, - source='pyparam_util.c', - deps='%s samba-hostconfig %s' % (libpython, pytalloc_util), - pyext=True, - enabled=bld.PYTHON_BUILD_IS_ENABLED() - ) +bld.SAMBA_SUBSYSTEM(pyparam_util, + source='pyparam_util.c', + deps='%s samba-hostconfig %s' % (libpython, pytalloc_util), + pyext=True, + enabled=bld.PYTHON_BUILD_IS_ENABLED() + ) bld.SAMBA_SUBSYSTEM('param_options', source='loadparm.c', diff --git a/third_party/pam_wrapper/wscript b/third_party/pam_wrapper/wscript index b94e275013e..aface6192c5 100644 --- a/third_party/pam_wrapper/wscript +++ b/third_party/pam_wrapper/wscript @@ -101,8 +101,7 @@ def build(bld): realname='pam_set_items.so') # Can be used to write pam tests in python - for env in bld.gen_python_environments(): - bld.SAMBA_PYTHON('pypamtest', - source='python/pypamtest.c', - deps='libpamtest', - install=False) + bld.SAMBA_PYTHON('pypamtest', + source='python/pypamtest.c', + deps='libpamtest', + install=False)