-
Notifications
You must be signed in to change notification settings - Fork 17
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
Windows arm64 support #2
Comments
Cross-compiling on Windows (to another Windows platform) works fine,1 so you won't need an ARM64 box except for testing. We're still waiting for GitHub to add them to GHA before we consider it "available" for OSS projects. (All the CPython releases are built on x64 machines, and we have some internal machines at work that I run tests on. For the most part, Windows x64 and ARM64 have been identical.) I'm not sure which trampolines you need, but we may be able to help with that. Similarly with checking the platform detection code. Rust certainly knows about it, as does the Footnotes
|
My janky code for repacking your builds into pybis requires running some code on the interpreter to extract metadata, so I think I need an arm64 box to run it. The trampolines are this weird little subproject, where I reimplemented the distlib Python script -> Windows .exe conversion thing: https://github.com/njsmith/posy/tree/main/src/trampolines/windows-trampolines/posy-trampoline For platform detection, I'm referring to this code, where posy tries to figure out which kinds of binaries can be run on the current computer: https://github.com/njsmith/posy/blob/main/src/platform_tags/windows.rs |
Let me know what metadata you need and I'll see if I can offer a better solution. If you like XML parsing, there's a Cross-compiling is a big thing for me right now. There was a discussion a while back about how to provide static metadata with a runtime, but unfortunately it didn't go far enough. But I'm willing to sneak stuff in if it'll help.
Oh fun :) Your description of BTW, you probably ought to switch to the
This looks like the most correct code I'm aware of. Personally I've been leaning towards "if someone is running under emulation, keep running under emulation" and so that x86-64 build would keep generating x86-64 binaries, but I think provided the output is clear enough about what it's doing then it's fine either way. |
The metadata extraction script is here: It's the same
Ah, but I am sneaky: https://learn.microsoft.com/en-us/windows/apps/design/globalizing/use-utf8-code-page |
Ah, all Wheel tags should be very predictable (depending on where nogil goes...), but they are unfortunately outside of core "control" these days. The sysconfig paths will be identical for all platforms - they should all be a single subdirectory each under
Nice. (I can't wait for Python to drop Windows 8.1 support :) ). Though I don't see any references to the actual setting? Does Rust add this bit by default?
|
I think the specific metadata should be pretty stable (e.g. it includes CPython ABI tags but not OS/architecture tags), which is good because it ends up as static metadata in a release :-). But it's not worth worrying about too much anyway. Cross-compiling is fancy but it's easy enough to borrow a Windows/arm64 box from Azure for a few minutes.
It's the helper crate I'm using -- it tries to use generally sensible modern defaults: https://docs.rs/embed-manifest/1.3.1/embed_manifest/fn.new_manifest.html |
Apparently it's a real thing now: https://www.nuget.org/packages/pythonarm64/
Todo:
The text was updated successfully, but these errors were encountered: