python: wscript_build: Build some modules for Python 3
authorLumir Balhar <lbalhar@redhat.com>
Sat, 10 Dec 2016 14:01:17 +0000 (15:01 +0100)
committerAndrew Bartlett <abartlet@samba.org>
Fri, 10 Mar 2017 06:31:11 +0000 (07:31 +0100)
Update a few wscript_build files to build Python 3-compatible modules
for Python 3.

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

index 009f5ecb6b6e808ce1df727650c44ff19d485129..30c0f727832d70506e39c7e7093dd59548151c3e 100644 (file)
@@ -24,9 +24,9 @@ bld.SAMBA_SUBSYSTEM('CREDENTIALS_NTLM',
        source='credentials_ntlm.c',
        deps='samba-credentials')
 
-bld.SAMBA_PYTHON('pycredentials',
-       source='pycredentials.c',
-       public_deps='samba-credentials cmdline-credentials pytalloc-util pyparam_util CREDENTIALS_KRB5 CREDENTIALS_SECRETS',
-       realname='samba/credentials.so'
-       )
-
+for env in bld.gen_python_environments():
+       bld.SAMBA_PYTHON('pycredentials',
+               source='pycredentials.c',
+               public_deps='samba-credentials cmdline-credentials pytalloc-util pyparam_util CREDENTIALS_KRB5 CREDENTIALS_SECRETS',
+               realname='samba/credentials.so'
+               )
index 5ab0d7d07dc6bbf0789f55ca32efce5ff56319f7..fa3b8b5de179ae69d7f3ea217c5afce9026c8392 100644 (file)
@@ -15,12 +15,15 @@ bld.SAMBA_SUBSYSTEM('LIBPYTHON',
        pyext=True,
        )
 
+for env in bld.gen_python_environments():
+       pytalloc_util = bld.pyembed_libname('pytalloc-util')
+       pyparam_util = bld.pyembed_libname('pyparam_util')
 
-bld.SAMBA_PYTHON('python_glue',
-       source='pyglue.c',
-       deps='pyparam_util samba-util netif pytalloc-util',
-       realname='samba/_glue.so'
-       )
+       bld.SAMBA_PYTHON('python_glue',
+               source='pyglue.c',
+               deps='%s samba-util netif %s' % (pyparam_util, pytalloc_util),
+               realname='samba/_glue.so'
+               )
 
 for env in bld.gen_python_environments():
        # install out various python scripts for use by make test
index 2ad753b7a338b78898941e2d6fea037c887311df..b7a551f53b42df87eb24e6f3b74236630b54cdb6 100644 (file)
@@ -35,24 +35,27 @@ bld.SAMBA_SUBSYSTEM('SECRETS',
        deps='ldb tdb-wrap util_tdb NDR_SECURITY tevent ldbwrap'
        )
 
-
-bld.SAMBA_PYTHON('pyparam',
-       source='pyparam.c',
-       deps='samba-hostconfig pytalloc-util',
-       realname='samba/param.so'
-       )
+for env in bld.gen_python_environments():
+       pytalloc_util = bld.pyembed_libname('pytalloc-util')
+       pyparam_util = bld.pyembed_libname('pyparam_util')
+
+       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='LIBPYTHON samba-hostconfig %s' % pytalloc_util,
+           pyext=True
+               )
 
 bld.SAMBA_SUBSYSTEM('param_options',
        source='loadparm.c',
        deps='samba-hostconfig')
 
 
-bld.SAMBA_SUBSYSTEM('pyparam_util',
-       source='pyparam_util.c',
-       deps='LIBPYTHON samba-hostconfig pytalloc-util',
-       pyext=True,
-       )
-
 bld.SAMBA_LIBRARY('shares',
                   source=[],
                   deps='share',