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

Allow cross-compiling for Windows ARM64 #343

Merged
merged 4 commits into from May 17, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 3 additions & 1 deletion buildlibxml.py
Expand Up @@ -38,7 +38,9 @@ def download_and_extract_windows_binaries(destdir):
if release_path in filename
]

if platform.machine() == 'ARM64':
# Check for native ARM64 build or the environment variable that is set by
# Visual Studio for cross-compilation (same variable as setuptools uses)
if platform.machine() == 'ARM64' or os.getenv('VSCMD_ARG_TGT_ARCH') == 'arm64':
zooba marked this conversation as resolved.
Show resolved Hide resolved
arch = "win-arm64"
elif sys.maxsize > 2**32:
arch = "win64"
Expand Down
3 changes: 2 additions & 1 deletion setupinfo.py
Expand Up @@ -3,9 +3,10 @@
import os
import os.path
import subprocess

from setuptools.command.build_ext import build_ext as _build_ext
from distutils.core import Extension
scoder marked this conversation as resolved.
Show resolved Hide resolved
from distutils.errors import CompileError, DistutilsOptionError
from distutils.command.build_ext import build_ext as _build_ext
from versioninfo import get_base_dir

try:
Expand Down