From fdb6305c861a088f797d29889c51c0553cc048be Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Fri, 15 Feb 2019 16:37:48 +1300 Subject: [PATCH] build: Remove bld.gen_python_environments() This was part of --extra-python support. Signed-off-by: Andrew Bartlett Reviewed-by: Garming Sam --- auth/credentials/wscript_build | 15 +- buildtools/wafsamba/samba_python.py | 10 - lib/crypto/wscript_build | 9 +- lib/ldb-samba/wscript_build | 13 +- lib/ldb/wscript | 49 ++- lib/talloc/wscript | 29 +- lib/tdb/wscript | 24 +- lib/tevent/wscript | 13 +- libcli/nbt/wscript_build | 3 +- libcli/security/wscript_build | 13 +- libcli/util/wscript_build | 5 +- libgpo/wscript_build | 11 +- python/wscript | 48 ++- source3/param/wscript_build | 5 +- source3/passdb/wscript_build | 7 +- source3/wscript_build | 12 +- source4/auth/gensec/wscript_build | 17 +- source4/auth/wscript_build | 21 +- source4/dns_server/wscript_build | 19 +- source4/dsdb/wscript_build | 27 +- source4/lib/messaging/wscript_build | 8 +- source4/lib/policy/wscript_build | 13 +- source4/lib/registry/wscript_build | 7 +- source4/libnet/wscript_build | 49 ++- source4/librpc/wscript_build | 591 ++++++++++++++-------------- source4/ntvfs/posix/wscript_build | 9 +- source4/param/wscript_build | 54 ++- third_party/pam_wrapper/wscript | 9 +- 28 files changed, 523 insertions(+), 567 deletions(-) diff --git a/auth/credentials/wscript_build b/auth/credentials/wscript_build index aaef541f57ac..637b6ccf2686 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 21fd3635e79a..b29a9d757452 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 77c62758ce82..6841f99d5682 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 396a3816c219..3264757e8b71 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 051c274f3c85..4f0c68c9c6cf 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_*') - - 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) + 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) # 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 eb68279638b4..81d12f8c054f 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('test_pytalloc', - 'test_pytalloc.c', - deps=name, - enabled=bld.PYTHON_BUILD_IS_ENABLED(), - realname='_test_pytalloc.so', - install=False) + 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) def test(ctx): diff --git a/lib/tdb/wscript b/lib/tdb/wscript index d4f2e88e279d..c616b40fbe55 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 ce6e12f47927..a9288add0a30 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 e965a347204a..090789ce99a9 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 6a6b0129d14f..ebbf79a19bac 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 ce918993d157..9713c9d5d706 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 6c4122759580..f36ccf2c701c 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 9012b5077a06..916031896d36 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 d999d0b89f28..8a374c466c04 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 2a35392f209a..faa0cc4b495d 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 f595b8ecfc08..317896eee46d 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 f9889d278a34..d14a50ff273c 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') - - bld.SAMBA_PYTHON('pygensec', - source='pygensec.c', - deps='gensec %s %s' % (pytalloc_util, pyparam_util), - realname='samba/gensec.so' - ) +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' + ) diff --git a/source4/auth/wscript_build b/source4/auth/wscript_build index 7f42042e05b9..daf5c8a422d5 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 0fd6aa80339b..8a8466d096f8 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 34ba8edb44a0..dbe58859a14b 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 878ff6474250..4688aa7bda4a 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 fa270887bd41..027d4bef0b67 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 06508fb38d57..46040291dc39 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 25c15d7aa0bc..3f36e4aa3aaa 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 48ba1151a69e..a282bcec1cdc 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') - - 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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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 - ) - - 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_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_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('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 - ) +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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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 + ) + +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_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_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_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_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 eac2dfc68e48..96c6b35441b9 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 cf2b7009ea1b..5d237184b10b 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 b94e275013e3..aface6192c51 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) -- 2.34.1