Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix relocation issues with binary launchers on Windows #4161

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

dimula73
Copy link

This patchset makes the launcher .exe file on Windows more usable:

  1. 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.

  2. 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 :)

On Windows the launcher script always has absolute path
in the shebang line, which makes the scripts non-runnable
in venv environment (or when relocated to another system)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant