Fix relocation issues with binary launchers on Windows #4161
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This patchset makes the launcher .exe file on Windows more usable:
The .exe file (and its script) is now relocatable, because it falls back to
python.exe
when shebang line of the script points to the invalid location (e.g. when the script was relocated). On Linux such problem in non-existent, since it usually sets/usr/bin/env python
, which is relocatable.When the launcher fails to run python it should return a non-zero value to pass error to upper levels. This bug makes meson basically ci-unusable on Windows, because meson sporadically returns success even when something has failed.
Still TODO: the patch needs binaries for x32 and arm64 platforms. I'm not sure how to build them. I'm also not sure if my build for x64 builds is suitable for this project, since I use llvm-mingw-ucrt. It might be a bit too new for the purpose of setuptools :)