wscript_build: make sure we link extra-python versions of libraries
authorNoel Power <noel.power@suse.com>
Wed, 4 Apr 2018 08:53:14 +0000 (09:53 +0100)
committerDouglas Bagnall <dbagnall@samba.org>
Fri, 13 Apr 2018 05:27:11 +0000 (07:27 +0200)
Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
auth/credentials/wscript_build
lib/ldb-samba/wscript_build
lib/talloc/wscript
libgpo/wscript_build
source3/wscript_build
source4/auth/wscript_build
source4/lib/messaging/wscript_build
source4/libnet/wscript_build
source4/librpc/wscript_build
source4/param/wscript_build

index 30c0f72..73e8e67 100644 (file)
@@ -25,8 +25,11 @@ bld.SAMBA_SUBSYSTEM('CREDENTIALS_NTLM',
        deps='samba-credentials')
 
 for env in bld.gen_python_environments():
+        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 pytalloc-util pyparam_util CREDENTIALS_KRB5 CREDENTIALS_SECRETS',
+               public_deps='samba-credentials cmdline-credentials %s %s CREDENTIALS_KRB5 CREDENTIALS_SECRETS' % (pytalloc_util, pyparam_util),
                realname='samba/credentials.so'
                )
index c538b5a..c846426 100644 (file)
@@ -21,8 +21,11 @@ bld.SAMBA_SUBSYSTEM('ldbwrap',
 for env in bld.gen_python_environments():
     pyparam_util = bld.pyembed_libname('pyparam_util')
     pyldb_util = bld.pyembed_libname('pyldb-util')
+    pyauth = 'pyauth'
+    if bld.env['IS_EXTRA_PYTHON']:
+        pyauth = 'extra-' + pyauth
     bld.SAMBA_PYTHON('python_samba__ldb', 'pyldb.c',
-                     deps='ldbsamba %s ldbwrap %s pyauth' % (pyparam_util, pyldb_util),
+                     deps='ldbsamba %s ldbwrap %s %s' % (pyparam_util, pyldb_util, pyauth),
                      realname='samba/_ldb.so')
 
 bld.SAMBA_MODULE('ldbsamba_extensions',
index 0834341..1b31672 100644 (file)
@@ -165,7 +165,7 @@ def build(bld):
 
             bld.SAMBA_PYTHON('test_pytalloc',
                             'test_pytalloc.c',
-                            deps='pytalloc',
+                            deps=name,
                             enabled=bld.PYTHON_BUILD_IS_ENABLED(),
                             realname='_test_pytalloc.so',
                             install=False)
index f456d41..9fbff9d 100644 (file)
@@ -8,7 +8,8 @@ bld.SAMBA3_LIBRARY('gpext',
                    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='''pyparam_util gpext talloc ads TOKEN_UTIL
-                     auth pyrpc_util''',
+                     deps='%s gpext talloc ads TOKEN_UTIL auth %s' % (pyparam_util, pyrpc_util),
                      realname='samba/gpo.so')
index cca0f4e..03d5724 100644 (file)
@@ -1306,9 +1306,12 @@ for env in bld.gen_python_environments():
                   )
 
 for env in bld.gen_python_environments():
+    pycredentials = 'pycredentials'
+    if bld.env['IS_EXTRA_PYTHON']:
+        pycredentials = 'extra-' + pycredentials
     bld.SAMBA3_PYTHON('pylibsmb',
                   source='libsmb/pylibsmb.c',
-                  deps='smbclient samba-credentials pycredentials',
+                  deps='smbclient samba-credentials %s' % pycredentials,
                   realname='samba/samba3/libsmb_samba_internal.so'
                   )
 
index 5786fa5..f750861 100644 (file)
@@ -47,10 +47,13 @@ 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'
+        if bld.env['IS_EXTRA_PYTHON']:
+            pycredentials = 'extra-' + pycredentials
        bld.SAMBA_PYTHON('pyauth',
                source='pyauth.c',
                public_deps='auth_system_session',
-               deps='samdb %s %s %s pycredentials auth4' % (pytalloc_util, pyparam_util, pyldb_util),
+               deps='samdb %s %s %s %s auth4' % (pytalloc_util, pyparam_util, pyldb_util, pycredentials),
                realname='samba/auth.so'
                )
 
index 4929ccd..92f231a 100644 (file)
@@ -20,6 +20,6 @@ for env in bld.gen_python_environments():
 
        bld.SAMBA_PYTHON('python_messaging',
                source='pymessaging.c',
-               deps='MESSAGING events pyparam_util pytalloc-util',
+               deps='MESSAGING events %s %s' % (pyparam_util, pytalloc_util),
                realname='samba/messaging.so'
                )
index df0a097..a449431 100644 (file)
@@ -20,7 +20,7 @@ for env in bld.gen_python_environments():
 
        bld.SAMBA_PYTHON('python_dckeytab',
                source='py_net_dckeytab.c libnet_export_keytab.c',
-               deps='pyrpc_util db-glue krb5 com_err',
+               deps='%s db-glue krb5 com_err' % (pyrpc_util),
                realname='samba/dckeytab.so',
                enabled=bld.CONFIG_SET('AD_DC_BUILD_IS_ENABLED')
                )
index ce893a2..b7fd141 100644 (file)
@@ -267,28 +267,28 @@ for env in bld.gen_python_environments():
 
        bld.SAMBA_PYTHON('python_srvsvc',
            source='../../librpc/gen_ndr/py_srvsvc.c',
-           deps='RPC_NDR_SRVSVC pytalloc-util pyrpc_util',
+           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 pytalloc-util pyrpc_util',
+               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 pytalloc-util pyrpc_util',
+               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 pytalloc-util pyrpc_util',
+               deps='RPC_NDR_WINREG %s %s' % (pytalloc_util, pyrpc_util),
                realname='samba/dcerpc/winreg.so',
                 cflags_end=gen_cflags
                )
@@ -296,7 +296,7 @@ for env in bld.gen_python_environments():
 
        bld.SAMBA_PYTHON('python_initshutdown',
                source='../../librpc/gen_ndr/py_initshutdown.c',
-               deps='RPC_NDR_INITSHUTDOWN pytalloc-util pyrpc_util',
+               deps='RPC_NDR_INITSHUTDOWN %s %s' % (pytalloc_util, pyrpc_util),
                realname='samba/dcerpc/initshutdown.so',
                 cflags_end=gen_cflags
                )
@@ -304,7 +304,7 @@ for env in bld.gen_python_environments():
 
        bld.SAMBA_PYTHON('python_epmapper',
                source='../../librpc/gen_ndr/py_epmapper.c',
-               deps='dcerpc pytalloc-util pyrpc_util',
+               deps='dcerpc %s %s' % (pytalloc_util, pyrpc_util),
                realname='samba/dcerpc/epmapper.so',
                 cflags_end=gen_cflags
                )
@@ -312,7 +312,7 @@ for env in bld.gen_python_environments():
 
        bld.SAMBA_PYTHON('python_mgmt',
                source='../../librpc/gen_ndr/py_mgmt.c',
-               deps='pytalloc-util dcerpc pyrpc_util',
+               deps='dcerpc %s %s' % (pytalloc_util, pyrpc_util),
                realname='samba/dcerpc/mgmt.so',
                 cflags_end=gen_cflags
                )
@@ -320,7 +320,7 @@ for env in bld.gen_python_environments():
 
        bld.SAMBA_PYTHON('python_atsvc',
                source='../../librpc/gen_ndr/py_atsvc.c',
-               deps='RPC_NDR_ATSVC pytalloc-util pyrpc_util',
+               deps='RPC_NDR_ATSVC %s %s' % (pytalloc_util, pyrpc_util),
                realname='samba/dcerpc/atsvc.so',
                 cflags_end=gen_cflags
                )
@@ -328,7 +328,7 @@ for env in bld.gen_python_environments():
 
        bld.SAMBA_PYTHON('python_svcctl',
                source='../../librpc/gen_ndr/py_svcctl.c',
-               deps='RPC_NDR_SVCCTL pytalloc-util pyrpc_util',
+               deps='RPC_NDR_SVCCTL %s %s' % (pytalloc_util, pyrpc_util),
                realname='samba/dcerpc/svcctl.so',
                 cflags_end=gen_cflags
                )
@@ -336,7 +336,7 @@ for env in bld.gen_python_environments():
 
        bld.SAMBA_PYTHON('python_wkssvc',
                source='../../librpc/gen_ndr/py_wkssvc.c',
-               deps='RPC_NDR_WKSSVC pytalloc-util pyrpc_util',
+               deps='RPC_NDR_WKSSVC %s %s' % (pytalloc_util, pyrpc_util),
                realname='samba/dcerpc/wkssvc.so',
                 cflags_end=gen_cflags
                )
@@ -344,21 +344,21 @@ for env in bld.gen_python_environments():
 
        bld.SAMBA_PYTHON('python_dfs',
                source='../../librpc/gen_ndr/py_dfs.c',
-               deps='RPC_NDR_DFS pytalloc-util pyrpc_util',
+               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 pytalloc-util pyrpc_util',
+               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 pytalloc-util pyrpc_util',
+               deps='RPC_NDR_UNIXINFO %s %s' % (pytalloc_util, pyrpc_util),
                realname='samba/dcerpc/unixinfo.so',
                 cflags_end=gen_cflags
                )
@@ -373,21 +373,24 @@ for env in bld.gen_python_environments():
 
        bld.SAMBA_PYTHON('python_server_id',
                source='../../librpc/gen_ndr/py_server_id.c',
-               deps='RPC_NDR_SERVER_ID pytalloc-util pyrpc_util',
+               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'
+       if bld.env['IS_EXTRA_PYTHON']:
+               python_netlogon = 'extra-' + python_netlogon
        bld.SAMBA_PYTHON('python_winbind',
                source='../../librpc/gen_ndr/py_winbind.c',
-               deps='RPC_NDR_WINBIND pytalloc-util pyrpc_util python_netlogon',
+               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_idmap',
                source='../../librpc/gen_ndr/py_idmap.c',
-               deps='NDR_IDMAP pytalloc-util pyrpc_util',
+               deps='NDR_IDMAP %s %s' % (pytalloc_util, pyrpc_util),
                realname='samba/dcerpc/idmap.so',
                 cflags_end=gen_cflags
                )
@@ -395,14 +398,14 @@ for env in bld.gen_python_environments():
 
        bld.SAMBA_PYTHON('python_drsuapi',
                source='../../librpc/gen_ndr/py_drsuapi.c',
-               deps='RPC_NDR_DRSUAPI pytalloc-util pyrpc_util',
+               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='pytalloc-util pyrpc_util NDR_SECURITY NDR_DNSP',
+               deps='%s %s NDR_SECURITY NDR_DNSP' % (pytalloc_util, pyrpc_util),
                realname='samba/dcerpc/dnsp.so',
                 cflags_end=gen_cflags
                )
@@ -410,35 +413,35 @@ for env in bld.gen_python_environments():
 
        bld.SAMBA_PYTHON('python_dcerpc_xattr',
                source='../../librpc/gen_ndr/py_xattr.c',
-               deps='pytalloc-util pyrpc_util RPC_NDR_XATTR',
+               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='pytalloc-util pyrpc_util RPC_NDR_XATTR',
+               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 pytalloc-util pyrpc_util',
+               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='pytalloc-util pyrpc_util',
+               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='pytalloc-util pyrpc_util',
+               deps='%s %s' % (pytalloc_util, pyrpc_util),
                realname='samba/dcerpc/messaging.so',
                 cflags_end=gen_cflags
                )
index 4a2b3b1..1066da4 100644 (file)
@@ -39,6 +39,7 @@ bld.SAMBA_SUBSYSTEM('SECRETS',
 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')
 
        bld.SAMBA_PYTHON('pyparam',
            source='pyparam.c',
@@ -48,7 +49,7 @@ for env in bld.gen_python_environments():
 
        bld.SAMBA_SUBSYSTEM(pyparam_util,
            source='pyparam_util.c',
-           deps='LIBPYTHON samba-hostconfig %s' % pytalloc_util,
+           deps='%s samba-hostconfig %s' % (libpython, pytalloc_util),
            pyext=True,
            enabled=bld.PYTHON_BUILD_IS_ENABLED()
            )