python/wscript: build grouping library for py2/py3 (--extra-python)
authorNoel Power <noel.power@suse.com>
Fri, 6 Apr 2018 15:35:49 +0000 (16:35 +0100)
committerDouglas Bagnall <dbagnall@samba.org>
Fri, 13 Apr 2018 05:27:12 +0000 (07:27 +0200)
Grouping library is not used for any delivered libraries, however
it is used internally when building local libraries used when
"make test TESTS='blah'" is invoked. Failure to provide the grouping
library results in missing symbols (and cores) when running tests

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
python/wscript

index 211fac4de620c9cd21cc9103a682ef7ac87c2c38..2978f187b67aed2a06be340833d70acbc85a660f 100644 (file)
@@ -39,23 +39,21 @@ def configure(conf):
         f.close()
 
 def build(bld):
-    bld.SAMBA_LIBRARY('samba_python',
-                      source=[],
-                      deps='''
-                           LIBPYTHON
-                           pytalloc-util
-                           pyrpc_util
-                           ''',
-                      grouping_library=True,
-                      private_library=True,
-                      pyembed=True,
-                      enabled=bld.PYTHON_BUILD_IS_ENABLED())
+
 
     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,
+                      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='''