diff options
author | Petr Viktorin <pviktori@redhat.com> | 2015-05-06 12:45:42 +0200 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2015-05-19 19:28:18 +0200 |
commit | 13a91e542737562e26368ca6a359cb20026bb724 (patch) | |
tree | a33a82b52aec39f28b6dead208462a1d8a3c9e22 /buildtools/wafsamba | |
parent | cd6615ecbd43d53fa353a18bd6db2291b086de2d (diff) | |
download | samba-13a91e542737562e26368ca6a359cb20026bb724.tar.gz |
buildtools: Expose the Python 3 ABI tag
Expose the tag in the env to allow using it in pkg-config files
Add a "pyembed_libname" function to correctly form library names.
(This can't be done automatically in SAMBA_LIBRARY because the name
could be used as a dependency for another library)
Signed-off-by: Petr Viktorin <pviktori@redhat.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jelmer Vernooij <jelmer@samba.org>
Diffstat (limited to 'buildtools/wafsamba')
-rw-r--r-- | buildtools/wafsamba/samba_python.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/buildtools/wafsamba/samba_python.py b/buildtools/wafsamba/samba_python.py index a371b434a78..b90655d9a2c 100644 --- a/buildtools/wafsamba/samba_python.py +++ b/buildtools/wafsamba/samba_python.py @@ -23,6 +23,12 @@ def SAMBA_CHECK_PYTHON_HEADERS(conf, mandatory=True): else: conf.msg("python headers", "using cache") + if conf.env['PYTHON_VERSION'] > '3': + abi_pattern = os.path.splitext(conf.env['pyext_PATTERN'])[0] + conf.env['PYTHON_SO_ABI_FLAG'] = abi_pattern % '' + else: + conf.env['PYTHON_SO_ABI_FLAG'] = '' + def SAMBA_PYTHON(bld, name, source='', @@ -69,3 +75,9 @@ def SAMBA_PYTHON(bld, name, enabled=enabled) Build.BuildContext.SAMBA_PYTHON = SAMBA_PYTHON + + +def pyembed_libname(bld, name, extrapython=False): + return name + bld.env['PYTHON_SO_ABI_FLAG'] + +Build.BuildContext.pyembed_libname = pyembed_libname |