summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorChristoph Reiter <reiter.christoph@gmail.com>2018-08-21 09:23:49 +0000
committerChristoph Reiter <reiter.christoph@gmail.com>2018-08-21 09:23:49 +0000
commit9ec6d0bbf379b76b724d08d1d4d271ff4971e698 (patch)
treeabc06fda02f549c6df01981abff3a20d9cd5bcbc /tools
parent7378dedc564dbf7ba271853938ce0c58bff071b8 (diff)
parent2a6fc83276e9ced066ea08aed591f40bba0409eb (diff)
downloadgobject-introspection-9ec6d0bbf379b76b724d08d1d4d271ff4971e698.tar.gz
Merge branch 'tools.windows' into 'master'
MSVC builds: Further fix giscanner Python module and the Python scripts in tools/ See merge request GNOME/gobject-introspection!61
Diffstat (limited to 'tools')
-rwxr-xr-xtools/g-ir-tool-template.in2
-rw-r--r--tools/meson.build9
2 files changed, 8 insertions, 3 deletions
diff --git a/tools/g-ir-tool-template.in b/tools/g-ir-tool-template.in
index 83279bd4..fb6b665b 100755
--- a/tools/g-ir-tool-template.in
+++ b/tools/g-ir-tool-template.in
@@ -1,4 +1,4 @@
-#!/usr/bin/env @PYTHON@
+#!@PYTHON_CMD@
# -*- Mode: Python -*-
# GObject-Introspection - a framework for introspecting GObject libraries
# Copyright (C) 2008 Johan Dahlin
diff --git a/tools/meson.build b/tools/meson.build
index 73472664..912eb6ba 100644
--- a/tools/meson.build
+++ b/tools/meson.build
@@ -9,13 +9,18 @@ if get_option('doctool')
tools += [['g-ir-doc-tool', 'docmain', 'doc_main']]
endif
-python_name = 'python@0@'.format(python.language_version().split('.')[0])
+if cc.get_id() == 'msvc'
+ python_cmd = python.get_variable('prefix') + '\\python.exe'
+else
+ python_cmd = '/usr/bin/env python@0@'.format(python.language_version().split('.')[0])
+endif
+
tool_output = []
foreach tool : tools
tools_conf = configuration_data()
tools_conf.set('libdir', libdir_abs)
tools_conf.set('datarootdir', datadir_abs)
- tools_conf.set('PYTHON', python_name)
+ tools_conf.set('PYTHON_CMD', python_cmd)
tools_conf.set('TOOL_MODULE', tool[1])
tools_conf.set('TOOL_FUNCTION', tool[2])