diff options
author | Andrew Bartlett <abartlet@samba.org> | 2017-03-06 19:25:13 +1300 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2017-03-10 07:31:10 +0100 |
commit | f5cafee0c7a96396798d2b229ff3f9dced1d74f3 (patch) | |
tree | ff09905726da8ed1f2ce87b05d04be30b71ca998 /lib/talloc/wscript | |
parent | 132cbad9ce6372525581f8115ec4cba92b910b42 (diff) | |
download | samba-f5cafee0c7a96396798d2b229ff3f9dced1d74f3.tar.gz |
talloc: use the system pytalloc-util for python3 as well
This involves installing a .pc file for the python3 library as well
To get the .pc file generated and installed is quite a mission, we
have to rework the talloc build system to ensure that the second 'env'
created for EXTRA_PYTHON has everything set up on it, the
TALLOC_VERSION in particular.
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Incorportaing fixes by Petr Viktorin <pviktori@redhat.com>
Signed-off-by: Petr Viktorin <pviktori@redhat.com>
Diffstat (limited to 'lib/talloc/wscript')
-rw-r--r-- | lib/talloc/wscript | 44 |
1 files changed, 30 insertions, 14 deletions
diff --git a/lib/talloc/wscript b/lib/talloc/wscript index 7f9bad74355..af939104a17 100644 --- a/lib/talloc/wscript +++ b/lib/talloc/wscript @@ -48,20 +48,24 @@ def configure(conf): conf.env.disable_python = getattr(Options.options, 'disable_python', False) - if not conf.env.standalone_talloc: - if conf.CHECK_BUNDLED_SYSTEM_PKG('talloc', minversion=VERSION, - implied_deps='replace'): - conf.define('USING_SYSTEM_TALLOC', 1) - if conf.CHECK_BUNDLED_SYSTEM_PKG('pytalloc-util', minversion=VERSION, - implied_deps='talloc replace'): - conf.define('USING_SYSTEM_PYTALLOC_UTIL', 1) - conf.env.TALLOC_COMPAT1 = False if conf.env.standalone_talloc: conf.env.TALLOC_COMPAT1 = Options.options.TALLOC_COMPAT1 + conf.env.PKGCONFIGDIR = '${LIBDIR}/pkgconfig' + conf.env.TALLOC_VERSION = VERSION conf.CHECK_XSLTPROC_MANPAGES() + conf.CHECK_HEADERS('sys/auxv.h') + conf.CHECK_FUNCS('getauxval') + + conf.SAMBA_CONFIG_H() + + conf.SAMBA_CHECK_UNDEFINED_SYMBOL_FLAGS() + + # We need to set everything non-python up before here, because + # SAMBA_CHECK_PYTHON makes a copy of conf and we need it set up correctly + if not conf.env.disable_python: # also disable if we don't have the python libs installed conf.SAMBA_CHECK_PYTHON(mandatory=False, version=(2,4,2)) @@ -70,20 +74,32 @@ def configure(conf): Logs.warn('Disabling pytalloc-util as python devel libs not found') conf.env.disable_python = True - conf.CHECK_HEADERS('sys/auxv.h') - conf.CHECK_FUNCS('getauxval') + if not conf.env.standalone_talloc: + if conf.CHECK_BUNDLED_SYSTEM_PKG('talloc', minversion=VERSION, + implied_deps='replace'): + conf.define('USING_SYSTEM_TALLOC', 1) - conf.SAMBA_CONFIG_H() + using_system_pytalloc_util = True + if not conf.CHECK_BUNDLED_SYSTEM_PKG('pytalloc-util', minversion=VERSION, + implied_deps='talloc replace'): + using_system_pytalloc_util = False - conf.SAMBA_CHECK_UNDEFINED_SYMBOL_FLAGS() + # We need to get a pytalloc-util for all the python versions + # we are building for + if conf.env['EXTRA_PYTHON']: + name = 'pytalloc-util' + conf.all_envs['extrapython']['PYTHON_SO_ABI_FLAG'] + if not conf.CHECK_BUNDLED_SYSTEM_PKG(name, minversion=VERSION, + implied_deps='talloc replace'): + using_system_pytalloc_util = False + + if using_system_pytalloc_util: + conf.define('USING_SYSTEM_PYTALLOC_UTIL', 1) def build(bld): bld.RECURSE('lib/replace') if bld.env.standalone_talloc: - bld.env.PKGCONFIGDIR = '${LIBDIR}/pkgconfig' - bld.env.TALLOC_VERSION = VERSION private_library = False # should we also install the symlink to libtalloc1.so here? |