Skip to content

{Packaging} Prepare native Windows ARM64 packages - #34195

Draft
René Dudfield (illume) wants to merge 11 commits into
Azure:devfrom
illume:feature/windows-arm64-packaging
Draft

René Dudfield (illume) wants to merge 11 commits into
Azure:devfrom
illume:feature/windows-arm64-packaging

Conversation

@illume

@illume René Dudfield (illume) commented Oct 8, 2026 •

Copy link
Copy Markdown

🤖 PR Validation — ️✔️ All clear

Breaking Changes
️✔️ None

WIP: this is a proof of concept to identify the remaining work for native
Windows ARM64 packaging.

The current Windows lock has three packages without CPython 3.14 ARM64 wheels:
bcrypt==3.2.0, cryptography==48.0.1, and psutil==6.1.0. Newer bcrypt and
psutil releases publish ARM64 wheels. Cryptography ARM64 wheels return in
version 51, which also requires a compatible pyOpenSSL release.


Related command

N/A

Description

Prepare native Windows ARM64 Azure CLI packages for
Azure/azure-cli#29317.

This draft:

  • adds ARM64 support to the Windows embedded-Python builder;
  • upgrades to WiX 3.14.1, verifies its SHA-256 digest, and adds ARM64 MSI
    product metadata and upgrade handling;
  • adds gated matrix entries for ARM64 MSI and ZIP builds and installation
    tests on a proposed native Windows ARM64 pool;
  • updates manual and pipeline installation tests for the native Program Files
    location; and
  • gates ARM64 dependency verification, builds, and installation tests behind
    the enableWindowsArm64 pipeline parameter, which defaults to false.

The existing released dependency pins remain unchanged so ordinary development
and CI environments stay resolvable. Enable the ARM64 jobs only after:

  • cryptography 51 publishes its merged Windows ARM64 wheels, tracked by
    pyca/cryptography#15350;
  • a compatible pyOpenSSL release is available;
  • the Windows lock uses architecture-specific pins that preserve win32
    support; and
  • pool-windows-2022-arm64 is a proposed pool name and must be provisioned or
    replaced with the platform engineering team's final 1ES pool.

Keep this PR in draft until those dependency and infrastructure gates are
available.

Assisted by Copilot.

Testing Guide

Completed:

python build_scripts/windows/tests/test_arm64_packaging.py
python -m py_compile \
  build_scripts/windows/scripts/test_msi_package.py \
  build_scripts/windows/tests/test_arm64_packaging.py
git -c core.whitespace=cr-at-eol diff --check upstream/dev..HEAD
  • All five focused packaging configuration tests pass.
  • Both changed Azure Pipelines YAML files parse successfully.
  • WiX 3.14.1 Wix.targets maps InstallerPlatform from Platform; the pinned
    release archive matches SHA-256
    6ac824e1642d6f7277d0ed7ea09411a508f6116ba6fae0aa5f2c7daa2ff43d31.
  • CPython 3.14.8 publishes the required Windows ARM64 embeddable archive.
  • In Azure Pipelines build 363343,
    both existing Windows x86 and x64 MSI jobs passed after the WiX 3.14 update.
    The overall run was later canceled when the branch history was rewritten.
    A fork-only matching validation run
    also built and verified both MSI files.
  • A binary-only audit of the current 143 Windows requirements found 140
    compatible ARM64 wheels. ARM64 CI remains disabled by default because the
    current bcrypt, cryptography, psutil, and related pyOpenSSL pins require a
    coordinated update.
  • A fork-only native Windows ARM64
    source-build probe
    downloaded the ARM64 embedded Python runtime and built the local Azure CLI,
    core, and telemetry wheels. Pip selected source archives for bcrypt and
    cryptography; cryptography then stopped before Rust compilation because its
    isolated embedded-Python build environment could not import maturin.

Not completed:

  • A complete native Windows ARM64 MSI/ZIP build. Source fallback needs the
    upstream cryptography wheel toolchain (maturin, Rust, and static OpenSSL),
    and the proposed Azure Pipelines pool is not yet configured.
  • ARM64 dependency-lock verification, because cryptography 51 and the
    compatible pyOpenSSL release do not yet exist.

History Notes

N/A


This checklist is used to make sure that common guidelines for a pull request are followed.

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
There may be pipelines that require an authorized user to comment /azp run to run.

@microsoft-github-policy-service microsoft-github-policy-service Bot added the customer-reported Issues that are reported by GitHub users external to the Azure organization. label Oct 8, 2026
@microsoft-github-policy-service

Copy link
Copy Markdown
Contributor

Thank you for your contribution René Dudfield (@illume)! We will review the pull request and get back to you soon.

@a0x1ab

Copy link
Copy Markdown
Member

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 3 pipeline(s).

@illume

Copy link
Copy Markdown
Author

/azp run

@azure-pipelines

Copy link
Copy Markdown
Commenter does not have sufficient privileges for PR 34195 in repo Azure/azure-cli

@a0x1ab

Copy link
Copy Markdown
Member

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 3 pipeline(s).

@yonzhan

Copy link
Copy Markdown
Collaborator

Please fix CI issues

@illume

Copy link
Copy Markdown
Author

I checked https://github.com/pyca/cryptography/tags no new release yet.

@illume
René Dudfield (illume) force-pushed the feature/windows-arm64-packaging branch from 16157d0 to 8f4cedc Compare October 20, 2026 07:17
@a0x1ab

Copy link
Copy Markdown
Member

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 3 pipeline(s).

Model the dependency versions needed for native Windows ARM64 packaging
across the generated platform locks. Keeping the three lock files aligned
avoids platform-specific resolution drift while the packaging work is
developed.
Teach the Windows builder to select the ARM64 CPython runtime and emit an
ARM64 MSI with architecture-specific product metadata. Update install tests
and documentation to use the native Program Files location.

WiX 3.14 is required because the previous WiX 3.10 toolset cannot build
ARM64 Windows Installer packages.
Add proposed native Windows ARM64 matrix entries for dependency validation,
MSI and ZIP packaging, and installation tests. Keep existing x86 and x64
jobs on their current pool and preserve architecture-specific artifacts.

Extend the packaging regression test so future pipeline edits cannot
silently drop ARM64 coverage.
Add Debug and Release ARM64 mappings to the Windows solution so local and
IDE builds select the ARM64 WiX project configuration consistently with the
command-line packaging flow.
Pin and verify the SHA-256 digest of the WiX 3.14.1 archive before
extraction. The build downloads executable packaging tools, so a corrupted
or replaced archive must fail rather than enter the release toolchain.
Use psutil 7.2.2 only on Windows ARM64, where it provides a native wheel.
Keep Windows x86 on 6.1.0 because newer psutil releases no longer publish a
win32 wheel and the existing x86 MSI must remain buildable.
Select the future cryptography and pyOpenSSL pair only on Windows ARM64.
Keep the current pair for other Windows architectures because cryptography
50 and later no longer publish win32 wheels.

This preserves the existing x86 MSI while preparing ARM64 for the first
cryptography release that publishes native wheels.
Restore the released dependency locks and compile-time gate ARM64 pipeline
entries behind a disabled parameter. Cryptography 51, its compatible
pyOpenSSL release, and the native Windows ARM64 pool are not available yet.

The gate keeps normal development and CI environments resolvable while
retaining the packaging and test wiring for later activation.
Version the local WiX cache directory. The builder reuses an existing cache,
so sharing the old path could silently run WiX 3.10 and fail to produce a
valid ARM64 package.
Detect an installed ARM64 product from the x64 MSI and require it to be
removed first. Windows ARM64 can run the x64 package under emulation, and
both architectures use the native Program Files path.

Because the products have separate upgrade codes, allowing both would let
the x64 installer overwrite files without a coordinated MSI upgrade.
@illume
René Dudfield (illume) force-pushed the feature/windows-arm64-packaging branch from 8f4cedc to 4a8ba74 Compare October 20, 2026 07:41
@illume

René Dudfield (illume) commented Oct 20, 2026 •

Copy link
Copy Markdown
Author

Tried to fix CI errors, added commit message bodies, and then rebased on current dev.

Make the WiX download follow GitHub release redirects and fail on HTTP
errors before verifying or extracting the archive.

In cmd.exe, `if errorlevel 1` means the exit code is greater than or equal
to 1, so it catches values such as 1 and 3. It is also evaluated when the
statement executes.

By contrast, `%errorlevel%` inside a parenthesized block is expanded when
the entire block is parsed. The previous checks could therefore read a
stale value, ignore checksum and unzip failures, and fail later when
MSBuild could not find Heat.exe.
@illume
René Dudfield (illume) force-pushed the feature/windows-arm64-packaging branch from 4a8ba74 to 0cf1ed8 Compare October 20, 2026 07:54
@khmyznikov

Copy link
Copy Markdown

René Dudfield (@illume) you'll have to bump some deps but you can use conda to get missing packages:

conda install bcrypt==5.0.0
conda install cryptography==49.0.0
conda install psutil==7.2.2

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

act-platform-engineering-squad Auto-Assign Auto assign by bot customer-reported Issues that are reported by GitHub users external to the Azure organization. Packaging

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants