build: Remove bld.gen_python_environments()
authorAndrew Bartlett <abartlet@samba.org>
Fri, 15 Feb 2019 03:37:48 +0000 (16:37 +1300)
committerAndrew Bartlett <abartlet@samba.org>
Thu, 21 Mar 2019 04:06:14 +0000 (04:06 +0000)
This was part of --extra-python support.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
28 files changed:
auth/credentials/wscript_build
buildtools/wafsamba/samba_python.py
lib/crypto/wscript_build
lib/ldb-samba/wscript_build
lib/ldb/wscript
lib/talloc/wscript
lib/tdb/wscript
lib/tevent/wscript
libcli/nbt/wscript_build
libcli/security/wscript_build
libcli/util/wscript_build
libgpo/wscript_build
python/wscript
source3/param/wscript_build
source3/passdb/wscript_build
source3/wscript_build
source4/auth/gensec/wscript_build
source4/auth/wscript_build
source4/dns_server/wscript_build
source4/dsdb/wscript_build
source4/lib/messaging/wscript_build
source4/lib/policy/wscript_build
source4/lib/registry/wscript_build
source4/libnet/wscript_build
source4/librpc/wscript_build
source4/ntvfs/posix/wscript_build
source4/param/wscript_build
third_party/pam_wrapper/wscript

index aaef541..637b6cc 100644 (file)
@@ -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'
+)
index 21fd363..b29a9d7 100644 (file)
@@ -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
index 77c6275..6841f99 100644 (file)
@@ -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'
                )
index 396a381..3264757 100644 (file)
@@ -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',
index 051c274..4f0c68c 100644 (file)
@@ -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:
index eb68279..81d12f8 100644 (file)
@@ -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):
index d4f2e88..c616b40 100644 (file)
@@ -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'''
index ce6e12f..a9288ad 100644 (file)
@@ -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',
index e965a34..090789c 100644 (file)
@@ -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'
index 6a6b012..ebbf79a 100644 (file)
@@ -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'
+                 )
index ce91899..9713c9d 100644 (file)
@@ -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'
index 6c41227..f36ccf2 100644 (file)
@@ -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')
index 9012b50..9160318 100644 (file)
@@ -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)
index d999d0b..8a374c4 100644 (file)
@@ -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']),
index 2a35392..faa0cc4 100644 (file)
@@ -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]),
index f595b8e..317896e 100644 (file)
@@ -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'
index f9889d2..d14a50f 100644 (file)
@@ -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'
+        )
index 7f42042..daf5c8a 100644 (file)
@@ -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'
+        )
 
index 0fd6aa8..8a8466d 100644 (file)
@@ -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())
index 34ba8ed..dbe5885 100644 (file)
@@ -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()
+                 )
index 878ff64..4688aa7 100644 (file)
@@ -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'
index fa27088..027d4be 100644 (file)
@@ -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'
-    )
+        )
index 06508fb..4604029 100644 (file)
@@ -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'
index 25c15d7..3f36e4a 100644 (file)
@@ -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')
+        )
index 48ba115..a282bce 100644 (file)
@@ -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')
index eac2dfc..96c6b35 100644 (file)
@@ -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'
index cf2b700..5d23718 100644 (file)
@@ -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',
index b94e275..aface61 100644 (file)
@@ -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)