diff options
author | Chun-wei Fan <fanchunwei@src.gnome.org> | 2018-08-20 17:19:22 +0800 |
---|---|---|
committer | Chun-wei Fan <fanchunwei@src.gnome.org> | 2018-08-20 17:19:22 +0800 |
commit | 185bbcf2629f10471b83149d9b8ea61cfc8da7bf (patch) | |
tree | 6ef0f15a1b8156237d9639ac145d97994a974d5f | |
parent | 76067c85e199c0ce6b490301b89a4e17a74b3b51 (diff) | |
download | gobject-introspection-185bbcf2629f10471b83149d9b8ea61cfc8da7bf.tar.gz |
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.
-rwxr-xr-x | tools/g-ir-tool-template.in | 7 |
1 files changed, 6 insertions, 1 deletions
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: |