Skip to content

Fixed build for com and comext on Windows 10 ARM64#1617

Closed
ader1990 wants to merge 2 commits intomhammond:masterfrom
ader1990:arm64_patches_v1
Closed

Fixed build for com and comext on Windows 10 ARM64#1617
ader1990 wants to merge 2 commits intomhammond:masterfrom
ader1990:arm64_patches_v1

Conversation

@ader1990
Copy link
Copy Markdown

Updated the MAPI headers and univgw data conversion with ifdefs for ARM64
.
Visual Studio 2017 or 2019 are required for _M_ARM64 variable to be present. See:
https://docs.microsoft.com/en-us/cpp/preprocessor/predefined-macros?view=msvc-160

This is the first patch in the series to add support for building pywin32 on ARM64.

Updated MAPI headers and stub libraries with ifdefs for ARM64.
Updated univgw data conversion with ifdefs for ARM64.
@ader1990
Copy link
Copy Markdown
Author

These two commits do no interfere with the build process on other architectures.
Currently, there is no public CI that has Windows ARM64 envs where we can test the outcome of these commits.

The Python distutils have to be tweaked in order for the build to succeed, as the Visual Studio build tools for ARM64 are special in the sense that the cc.exe, ld.exe, etc, are 32 bit x86 binaries that execute emulated on Windows 10 ARM64. Windows on ARM has builtin emulation for 32 bit x86 (maybe x64 emulation will be added soon).

A fully-fledged example of how to install pywin32 and use it as a dependency for cloudbase-init can be found here:
https://github.com/cloudbase/cloudbase-init-arm-scripts

Python version that are supported: 3.8 or higher.
A hack to make the VS compilation work is needed in the builtin cpython distutils:
ader1990/cpython@b8c59c9
I will make a PR with a better approach to cpython in the following days. Any suggestions are welcome.

Thank you,
Adrian Vladu

@mhammond
Copy link
Copy Markdown
Owner

Thanks for the PR - do you have plans on updating it as you describe and to fix the CI failures?

@mhammond
Copy link
Copy Markdown
Owner

I'd still welcome a patch that fixes mapi building, but closing this to keep the list clean.

@mhammond mhammond closed this Aug 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants