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

Support Windows on ARM64 #2276

Open
skeptic-monkey opened this issue Oct 7, 2024 · 2 comments
Open

Support Windows on ARM64 #2276

skeptic-monkey opened this issue Oct 7, 2024 · 2 comments
Labels
need: upstream support An issue that needs changes in upstream code type: toolchain Related to the toolchains provided by rules_python

Comments

@skeptic-monkey
Copy link

🚀 feature request

Relevant Rules

Mostly all the rules included in bazelbuild/rules_python repository (hermetic python toolchain, pip_parse, ...)

Description

There is currently no support to build natively for Windows / ARM64 platform which is not convenient.
The Snapdragon X being used in popular laptops (surface pro for example), it now becomes quite important to be able to build for this platform natively.

Describe the solution you'd like

The ideal would be to download an arm64 version of python and use arm64 pip requirements (and per architecture requirement seem to be already supported).

Describe alternatives you've considered

A workaround would already to support building using an hermetic x86_64 python with x86_64 pip dependencies while using an arm64 host, relying on the x96_64 -> arm64 Windows emulation.

This doesn't work either, because pip_parse discards the x86_64 dependencies because it doesn't match the host cpu.

@aignas
Copy link
Collaborator

aignas commented Oct 9, 2024

I don't think I see Windows ARM64 interpreter builds for indygreg even in the latest release, hence I am not sure if that is something that rules_python has to provide.

Given that users can build their own Python interpreter and register it as a toolchain and use the pip parse rules to pull the dependencies (pending the work as part of #260, still experimental but in #2278 becomes one step closer to stabilization), I am inclined to close this as won't do.

Once indygreg provides builds for Windows ARM64 interpreter, we can add them as part of regular maintenance tasks.

@skeptic-monkey
Copy link
Author

It seems that indygreg might support it soon.
see indygreg/python-build-standalone#386

@aignas aignas added type: toolchain Related to the toolchains provided by rules_python need: upstream support An issue that needs changes in upstream code labels Nov 13, 2024
github-merge-queue bot pushed a commit that referenced this issue Nov 18, 2024
…2406)

Before this PR we would shell out to `uname` on UNIX systems to get the
`arch`
of the toolchain - on Windows we would not need to do it because there
used to
be only a single Windows platform. With this change we can correctly
support
the resolution of the python interpreter on various platforms and I have
also
added an env variable to customize the selection, so that users can use
`musl`
or a `freethreaded` interpreter if they wish.

As part of this change, I have restricted visibility of the config
settings
used in the toolchain alias repo so that we are creating fewer targets.
This is
a very good time to do this before `1.0.0`.

Fixes #2145
Work towards #2276
Work towards #2386
Work towards #1211 to unblock #2402
Work towards #1361

---------

Co-authored-by: Richard Levasseur <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
need: upstream support An issue that needs changes in upstream code type: toolchain Related to the toolchains provided by rules_python
Projects
None yet
Development

No branches or pull requests

2 participants