Skip to content

ENH: add win-64 to win-arm64 cross-python - #111

Open
MementoRC wants to merge 2 commits into
conda-forge:mainfrom
MementoRC:win-arm64-pr
Open

MementoRC wants to merge 2 commits into
conda-forge:mainfrom
MementoRC:win-arm64-pr

Conversation

@MementoRC

@MementoRC MementoRC commented Nov 6, 2026 •

Copy link
Copy Markdown

Checklist

  • Used a personal fork of the feedstock to propose changes
  • Bumped the build number (if the version is unchanged)
  • Reset the build number to 0 (if the version changed)
  • Re-rendered with the latest conda-smithy (Use the phrase @conda-forge-admin, please rerender in a comment in this PR for automated rerendering)
  • Ensured the license file is being packaged.

Adds cross-python_win-arm64, built on win-64, for python 3.14/3.14t/3.15/3.15t.
Follow-up to #103
Closes: #95

crossenv is unix-only, so on Windows:

  • build.sh runs under m2-bash
  • a .bat activation sets PYTHON, VSCMD_ARG_TGT_ARCH, SETUPTOOLS_EXT_SUFFIX, DIST_EXTRA_CONFIG, PIP_PREFIX and PYO3_CROSS_*; deactivation restores them
  • sitecustomize.py makes the build python report win-arm64 and the target EXT_SUFFIX
  • ${{ PYTHON }} renders to %PREFIX%\python.exe, which is the arm64 host python and cannot run on x64.
    Activation swaps in a small x64 launcher shim that forwards to %BUILD_PREFIX%\python.exe, keeping the original in
    BUILD_PREFIX so it is not packaged downstream.

The win tests cover activation/deactivation, wheel tags, cl emitting ARM64 objects, and the launcher shim.

Checked on my fork with a downstream build: https://github.com/MementoRC/cross-python-feedstock/actions/runs/42275866247
a C extension cross-built via ${{ PYTHON }} -m pip install . gives a package with only an ARM64 .pyd (no leaked python.exe), and it imports natively on windows-11-arm.

The linux_* -> osx-* lanes failed with Unsupported SDK version (2.17) / (2.39) on the first run. That was caused by conda-forge-ci-setup (conda-forge/conda-forge-ci-setup-feedstock#450), not by this PR: it fell back to the glibc c_stdlib_version when cross_target_platform is osx-*. It is fixed in conda-forge-ci-setup 4.32.1 (conda-forge/conda-forge-ci-setup-feedstock#456), and these lanes now pass.

crossenv only supports unix build machines, so on Windows a .bat activation
and sitecustomize.py point PYTHON, setuptools, pip and pyo3 at the target,
and an x64 launcher shim stands in for the arm64 host python.exe.
…2026.11.05.10.09.12

Other tools:
- conda-build 26.9.1
- rattler-build 0.80.0
- rattler-build-conda-compat 1.4.23
@MementoRC MementoRC changed the title Win arm64 pr ENH: add win-64 to win-arm64 cross-python Nov 6, 2026
@conda-forge-admin

Copy link
Copy Markdown
Contributor

Hi! This is the friendly automated conda-forge-linting service.

I just wanted to let you know that I linted all conda-recipes in your PR (recipe/recipe.yaml) and found it was in an excellent condition.

@MementoRC

Copy link
Copy Markdown
Author

@conda-forge-admin, please restart ci

@MementoRC

Copy link
Copy Markdown
Author

@conda-forge-admin, please restart ci

@MementoRC

Copy link
Copy Markdown
Author

@conda-forge-admin, please restart ci

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.

cross-python for win_arm64?

2 participants