buildtools: Use all of pyext_PATTERN in map_shlib_extension
authorPetr Viktorin <pviktori@redhat.com>
Wed, 12 Nov 2014 18:49:45 +0000 (19:49 +0100)
committerJelmer Vernooij <jelmer@samba.org>
Fri, 24 Apr 2015 02:26:45 +0000 (04:26 +0200)
In Python 3, C extension module filenames have an ABI tag;
the pyext_PATTERN is e.g. "%s.cpython-34m.so".
The build system was only using the last dot-separated element
of that extension (the ".so").

Use the whole extension when constructing the final filename.

Signed-off-by: Petr Viktorin <pviktori@redhat.com>
Reviewed-By: Jelmer Vernooij <jelmer@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date(master): Fri Apr 24 04:26:45 CEST 2015 on sn-devel-104

buildtools/wafsamba/samba_utils.py

index df4a552dbeed5b3408444db9b49b7d73389ac61b..e8bc0f38bc2a563033bba6739411c9218a9e0c32 100644 (file)
@@ -577,7 +577,7 @@ def map_shlib_extension(ctx, name, python=False):
         return name
     (root1, ext1) = os.path.splitext(name)
     if python:
-        (root2, ext2) = os.path.splitext(ctx.env.pyext_PATTERN)
+        return ctx.env.pyext_PATTERN % root1
     else:
         (root2, ext2) = os.path.splitext(ctx.env.shlib_PATTERN)
     return root1+ext2