setuptools icon indicating copy to clipboard operation
setuptools copied to clipboard

Fix relocation issues with binary launchers on Windows

Open dimula73 opened this issue 1 year ago • 0 comments

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

dimula73 avatar Dec 15 '23 10:12 dimula73