Skip to content

Draft: Use python3 as the shebang on Windows

Luca Bacci requested to merge python-shebang-on-windows into main

Since commit 013980d8, Python tools like gdbus-codegen, glib-genmarshal, glib-mkenums, etc. have a shebang with the full path to the python binary.

Shebangs cannot be shell-quoted (most utilities just do not expect that), but since shebangs can have arguments, the path to the interpreter must not have spaces. This is a problem on Windows, where Python is commonly installed under the "Program Files" folder.

Moreover, by using the full path to the interpreter (at build time), the bundle is not relocatable, which is the norm on Windows. It means that the bundle cannot be moved between directories or different systems

See https://github.com/mesonbuild/meson/issues/13804

Fixes #3331, #3520 (closed)

Merge request reports

Loading