python: wscript_build: Build some DCE/RPC modules with Python 3
authorLumir Balhar <lbalhar@redhat.com>
Tue, 20 Dec 2016 09:54:24 +0000 (10:54 +0100)
committerAndrew Bartlett <abartlet@samba.org>
Fri, 10 Mar 2017 06:31:11 +0000 (07:31 +0100)
Samba.auth Python module depends on a lot of DCE/RPC modules which
have to be built with Python 3 to make port of samba.auth to
Python 3 possible.

Signed-off-by: Lumir Balhar <lbalhar@redhat.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
source4/librpc/wscript_build

index cc03e10fa160759730ca6cfc87f14c0c1a2f0e54..07625cd62c7241a59f4c77c171a70a91af99db1d 100644 (file)
@@ -175,22 +175,75 @@ bld.SAMBA_LIBRARY('dcerpc',
        )
 
 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,
-        )
+       pyrpc_util = bld.pyembed_libname('pyrpc_util')
+       pytalloc_util = bld.pyembed_libname('pytalloc-util')
+       pyparam_util = bld.pyembed_libname('pyparam_util')
 
-    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'
-        )
+       bld.SAMBA_SUBSYSTEM(pyrpc_util,
+               source='rpc/pyrpc_util.c',
+               public_deps='%s %s dcerpc MESSAGING' % (pytalloc_util, pyparam_util),
+               pyext=True,
+               )
 
+       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'
+               )
+
+       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'
+               )
+
+       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'
+               )
+
+       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'
+               )
+
+       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'
+               )
+
+       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'
+               )
+
+       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'
+               )
+
+       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'
+               )
+
+       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'
+               )
+
+       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'
+               )
 
 bld.SAMBA_PYTHON('python_srvsvc',
     source='../../librpc/gen_ndr/py_srvsvc.c',
@@ -210,18 +263,6 @@ bld.SAMBA_PYTHON('python_dns',
        realname='samba/dcerpc/dns.so'
        )
 
-bld.SAMBA_PYTHON('python_auth',
-       source='../../librpc/gen_ndr/py_auth.c',
-       deps='NDR_AUTH pytalloc-util pyrpc_util',
-       realname='samba/dcerpc/auth.so'
-       )
-
-bld.SAMBA_PYTHON('python_krb5pac',
-       source='../../librpc/gen_ndr/py_krb5pac.c',
-       deps='ndr-krb5pac pytalloc-util pyrpc_util',
-       realname='samba/dcerpc/krb5pac.so'
-       )
-
 bld.SAMBA_PYTHON('python_winreg',
        source='../../librpc/gen_ndr/py_winreg.c',
        deps='RPC_NDR_WINREG pytalloc-util pyrpc_util',
@@ -229,16 +270,6 @@ bld.SAMBA_PYTHON('python_winreg',
        )
 
 
-for env in bld.gen_python_environments():
-       pytalloc_util = bld.pyembed_libname('pytalloc-util')
-       pyrpc_util = bld.pyembed_libname('pyrpc_util')
-       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'
-               )
-
-
 bld.SAMBA_PYTHON('python_initshutdown',
        source='../../librpc/gen_ndr/py_initshutdown.c',
        deps='RPC_NDR_INITSHUTDOWN pytalloc-util pyrpc_util',
@@ -267,20 +298,6 @@ bld.SAMBA_PYTHON('python_atsvc',
        )
 
 
-bld.SAMBA_PYTHON('python_dcerpc_nbt',
-       source='../../librpc/gen_ndr/py_nbt.c',
-       deps='ndr_nbt RPC_NDR_NBT pytalloc-util pyrpc_util',
-       realname='samba/dcerpc/nbt.so'
-       )
-
-
-bld.SAMBA_PYTHON('python_samr',
-       source='../../librpc/gen_ndr/py_samr.c',
-       deps='dcerpc-samr pytalloc-util pyrpc_util',
-       realname='samba/dcerpc/samr.so'
-       )
-
-
 bld.SAMBA_PYTHON('python_svcctl',
        source='../../librpc/gen_ndr/py_svcctl.c',
        deps='RPC_NDR_SVCCTL pytalloc-util pyrpc_util',
@@ -288,13 +305,6 @@ bld.SAMBA_PYTHON('python_svcctl',
        )
 
 
-bld.SAMBA_PYTHON('python_lsa',
-       source='../../librpc/gen_ndr/py_lsa.c',
-       deps='RPC_NDR_LSA pytalloc-util pyrpc_util',
-       realname='samba/dcerpc/lsa.so'
-       )
-
-
 bld.SAMBA_PYTHON('python_wkssvc',
        source='../../librpc/gen_ndr/py_wkssvc.c',
        deps='RPC_NDR_WKSSVC pytalloc-util pyrpc_util',
@@ -352,18 +362,6 @@ bld.SAMBA_PYTHON('python_drsuapi',
        realname='samba/dcerpc/drsuapi.so'
        )
 
-bld.SAMBA_PYTHON('python_dcerpc_security',
-       source='../../librpc/gen_ndr/py_security.c',
-       deps='pytalloc-util pyrpc_util NDR_SECURITY',
-       realname='samba/dcerpc/security.so'
-       )
-
-bld.SAMBA_PYTHON('python_dcerpc_drsblobs',
-       source='../../librpc/gen_ndr/py_drsblobs.c',
-       deps='pytalloc-util pyrpc_util NDR_SECURITY RPC_NDR_DRSBLOBS',
-       realname='samba/dcerpc/drsblobs.so'
-       )
-
 bld.SAMBA_PYTHON('python_dcerpc_dnsp',
        source='../../librpc/gen_ndr/py_dnsp.c',
        deps='pytalloc-util pyrpc_util NDR_SECURITY NDR_DNSP',
@@ -383,12 +381,6 @@ bld.SAMBA_PYTHON('python_dcerpc_idmap',
        realname='samba/dcerpc/idmap.so'
        )
 
-bld.SAMBA_PYTHON('python_netlogon',
-       source='../../librpc/gen_ndr/py_netlogon.c',
-       deps='RPC_NDR_NETLOGON pytalloc-util pyrpc_util',
-       realname='samba/dcerpc/netlogon.so'
-       )
-
 bld.SAMBA_PYTHON('python_dnsserver',
        source='../../librpc/gen_ndr/py_dnsserver.c',
        deps='RPC_NDR_DNSSERVER pytalloc-util pyrpc_util',