Windows build broken because of Python paths
013980d8 (cc @kepstin) made it so that import('python').find_installation(modules: ['packaging']).full_path()
(instead of the previous python3
) gets used as the shebang line for the helper programs.
I do, in fact, have Python installed at C:\Users\bugaevc\AppData\Local\Microsoft\WindowsApps\python3.exe
, which is in PATH
, so reachable as just python3
. Meson, however, says
Program python3 (packaging) found: YES (C:\Program Files\Meson\meson.exe runpython) modules: packaging
which... could work, I guess. But then calling .full_path()
on that just returns C:\Program Files\Meson\meson.exe
, resulting in
#!C:\Program Files\Meson\meson.exe
# pylint: disable=too-many-lines, missing-docstring, invalid-name
# This file is part of GLib
...
which, naturally, can not work at all. This then causes the following errors during build:
[8/1545] Generating GObject enum file gtk/css/gtkcssenumtypes.h (wrapped by meson to capture output)
FAILED: gtk/css/gtkcssenumtypes.h
"C:\Program Files\Meson\meson.exe" "--internal" "exe" "--capture" "gtk/css\gtkcssenumtypes.h" "--" "C:\Program Files/Meson/meson.exe" "path-to-build-dir/subprojects/glib/gobject/glib-mkenums" "--template" "path-to-build-dir/../gtk/css/gtkcssenumtypes.h.template" "path-to-build-dir/../gtk/css/gtkcssenums.h" "path-to-build-dir/../gtk/css/gtkcsserror.h" "path-to-build-dir/../gtk/css/gtkcsslocation.h" "path-to-build-dir/../gtk/css/gtkcsssection.h"
--- stderr ---
usage: meson [-h]
{setup,configure,dist,install,introspect,init,test,wrap,subprojects,rewrite,compile,devenv,env2mfile,help}
...
meson: error: unrecognized arguments: --template path-to-build-dir/../gtk/css/gtkcssenumtypes.h.template path-to-build-dir/../gtk/css/gtkcssenums.h path-to-build-dir/../gtk/css/gtkcsserror.h path-to-build-dir/../gtk/css/gtkcsslocation.h path-to-build-dir/../gtk/css/gtkcsssection.h