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

[python3] Support arm #21528

Merged
merged 6 commits into from
Dec 17, 2021
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions ports/python3/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"name": "python3",
"version-semver": "3.10.1",
"port-version": 1,
"port-version": 2,
"description": "The Python programming language",
"homepage": "https://github.com/python/cpython",
"supports": "!(arm | uwp)",
"supports": "!uwp & !(windows & arm)",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that is probably just to how vpckg tries to build python on windows arm. Is there a definite no from upstream for this configuration?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Upstream supports Windows+ARM. When I did the work to build the interpreter, I didn't investigate adding support for Windows ARM beyond a cursory attempt. I can't remember if I was testing the a cursed uwp-arm triplet, though, so it might be worth revisiting.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can think of that it is the same issue as:

if(VCPKG_TARGET_ARCHITECTURE STREQUAL arm64 AND VCPKG_TARGET_IS_WINDOWS) # Remove if PR #16111 is merged
list(APPEND _qarg_OPTIONS -DCMAKE_CROSSCOMPILING=ON -DCMAKE_SYSTEM_PROCESSOR:STRING=ARM64 -DCMAKE_SYSTEM_NAME:STRING=Windows)
endif()
which is due to the arm toolchain on windows not being correctly setup.

However since it is supported by upstream the support statement here is wrong.

Suggested change
"supports": "!uwp & !(windows & arm)",
"supports": "!uwp",

arm-windows just needs to be added to the ci.baseline to keep ci clean.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm... But python3 uses MSBuild. I wish I could remember what the problem was on ARM 😞

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The only problem is that the python executable is called below to get the extensions, and I've fixed that.
Now support arm on all platforms.

"dependencies": [
{
"name": "bzip2",
Expand Down