-
-
Notifications
You must be signed in to change notification settings - Fork 31.1k
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
Support -3.11-arm64 in py.exe launcher #90724
Comments
We now have a traditional installer that runs on Windows ARM64 devices, but it omits the py.exe launcher. This is because sys.winver is "3.11-arm64" and hence the registry tag (see PEP-514) is not detected by the launcher. Currently, the launcher is not included in the installer and appears as disabled with an explanatory note. We need to add support for it eventually, and possibly block the final/RC/beta releases if we don't have it. (We don't ship the launcher with Nuget or Store packages, so nobody will miss it there, but they probably will here.) 32-bit apps can still run on ARM64, so it isn't essential to make it a native process. It just has to be able to detect the registry keys. It should still support 32-bit and 64-bit installs, because those can also be run on ARM64 devices (though there are numerous things that don't work as well as a native build). Possibly we want to just do the work to directly follow PEP-514 now? Depends on who volunteers to work on this, I guess. |
PEP-514 looks good to me |
I'm working on this now. |
I'm working on what's become a rewrite of the launcher. If anyone would like to follow along, you can see my changes at main...zooba:bpo-46566 It's still missing some functionality, and I'm not sure it's any faster or less complex than the previous version :) But it should handle ARM64 properly, and also knows how to do an install of a requested version if you don't already have it (still TBD whether that stays) |
Hah, that's funny URL formatting. Let's see if this is any better: |
If it's already turning into a rewrite, how feasible would it be to adopt Brett's |
I looked at it already, and I'd have to write literally the same code to implement what's needed :) (as well as learning Rust and convincing everyone to let us use Rust in CPython...). Practically nothing can be reused - there's no registry, no shebang handling, and our process launching on Windows is already very complex (and has to remain that way for compatibility). For now, the old launcher will remain to be used for venv redirectors, but I've got the setup in the new one to be able to play the same role, as well as potentially being able to be a script or .pyz launcher with a simple rename. If Brett's proposal for extensions (other executables on PATH that know how to identify Python installs) happens, we'll probably copy it, though PEP-514 covers Windows adequately (and the rewrite allows non-PythonCore installs to be found/launched). But the codebase itself isn't helpful. |
Would it be possible to also make the launcher work when prepended to a zipfile? That's a really useful use-case (make a zipapp automatically runnable, but still a single file) that at the moment needs a 3rd party launcher (Vinay's simple-launcher project). If not, then that's fine, but if we're already doing a significant rewrite that might be a good time to add it. |
I'd like to, the main challenge with that is it'd invalidate the code signature on the file, which will make it basically unusable (at the very least, you'll get warnings). A simple rename does not. But yeah, it can probably go in. Hopefully my restructure will make it easier to follow where certain things get checked. |
"Practically nothing can be reused - there's no registry, no shebang handling, and our process launching on Windows is already very complex (and has to remain that way for compatibility)." I do process the shebang to restrict searching, or did you mean something else? And registry support is planned. |
That's what I meant. Guess I missed seeing it when scanning the code (probably I should've read the docs :D )
It's attached to a milestone with no due date and 0% completion ;) Being aware that you'll need to do it isn't the same as planning to do it. |
Posted my WIP as a draft PR. I'm still adding docs, tests and ironing out minor issues, but the core functionality is there (as well as some added bonuses). Feel free to review, and importantly to mark anywhere you'd like more explanatory comments. Currently the main known issue is that the "-3-32" (and now-deprecated "-3-64") arguments are not supported. But they will be! There are also likely to be a range of shebang templates that need better handling, and I'll go through the open issues to see what ought to be fixed there compared to today's version. |
I think this PR is "ready enough" to get in for broader testing, but in case anyone wants to try it first, I've attached a build from my own machine. You may need Programs & Features to remove any existing "Python Launcher" before installing this MSI, and you will need to do that to remove this later on, but it should otherwise behave identically to a per-user installed launcher. |
It's in! Any new issues probably won't be found until the next release, so I'll close this and we can open new bugs. |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: