From 185bbcf2629f10471b83149d9b8ea61cfc8da7bf Mon Sep 17 00:00:00 2001 From: Chun-wei Fan Date: Mon, 20 Aug 2018 17:19:22 +0800 Subject: g-ir-tool-templates.in: Fix installed use on Windows The .so file extension for compiled C Python modules is only valid if we are not on Windows. Use .pyd for the extension for Python modules on Windows so that we can use g-ir-scanner et al properly on Windows when installed. --- tools/g-ir-tool-template.in | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tools/g-ir-tool-template.in b/tools/g-ir-tool-template.in index 39b1b3d8..83279bd4 100755 --- a/tools/g-ir-tool-template.in +++ b/tools/g-ir-tool-template.in @@ -61,7 +61,12 @@ builtins.__dict__['DATADIR'] = datadir # Again, relative paths first so that the installation prefix is relocatable pylibdir = os.path.abspath(os.path.join(filedir, '..', 'lib', 'gobject-introspection')) -if not os.path.isfile(os.path.join(pylibdir, 'giscanner', '_giscanner.so')): + +py_mod_suffix = 'so' +if os.name == 'nt': + py_mod_suffix = 'pyd' + +if not os.path.isfile(os.path.join(pylibdir, 'giscanner', '_giscanner.' + py_mod_suffix)): # Running uninstalled? builddir = os.getenv('UNINSTALLED_INTROSPECTION_BUILDDIR', None) if builddir is not None: -- cgit v1.2.1