Skip to content

ENH: Add win-64 cross-python from linux-64, linux-aarch64 and osx-arm64 - #112

Open
MementoRC wants to merge 7 commits into
conda-forge:mainfrom
MementoRC:linux-win64
Open

MementoRC wants to merge 7 commits into
conda-forge:mainfrom
MementoRC:linux-win64

Conversation

@MementoRC

@MementoRC MementoRC commented Nov 7, 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.

Stacked on #111 (win-64 -> win-arm64). The first two commits are from #111.

Adds a win-64 cross-python with the clang_win-64 toolchain (MSVC ABI, vc14/ucrt).
Build hosts: linux-64, linux-aarch64 and osx-arm64. Python 3.14 and 3.15 only, as for win-arm64.

How it works:

  • The activation is a bash script.
  • sitecustomize.py points the build python at the target:
    • platform win-amd64, suffix .cp3XY-win_amd64.pyd;
    • packaging and pip tags win_amd64 (on macOS they ignore sysconfig);
    • headers from $PREFIX/include, empty CCSHARED, LDSHARED=$CC -shared;
    • nt install scheme, so packages go to Lib/site-packages.
  • LDFLAGS gets -fuse-ld=lld -L$PREFIX/libs.
  • It sets PIP_PREFIX and PYO3_CROSS_*.
  • $PREFIX/python.exe runs the build python.

Workarounds for clang-win-activation, both in the activation:

Downstream v1 recipes: rattler-build does not pass CI to build or test scripts.
The winsdk and msvc-headers-libs activations need it. Add:

build:
  script:
    env:
      CI: ${{ env.get("CI", default="") }}
    content: ...

The win-64 recipe test does the same.

Tested on my fork with a downstream package, from each build host:

  • cross-build a setuptools extension: Lib/site-packages/smoke.cp314-win_amd64.pyd, PE machine 0x8664;
  • import it on windows-latest: smoke.add(2, 3) == 5.

Runs:

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
…2026.11.07.18.09.50

Other tools:
- conda-build 26.9.1
- rattler-build 0.80.0
- rattler-build-conda-compat 1.4.23
@conda-forge-admin

Copy link
Copy Markdown
Contributor

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

I wanted to let you know that I linted all conda-recipes in your PR (recipe/recipe.yaml, smoketest-downstream/recipe.yaml) and found some lint.

Here's what I've got...

For recipe/recipe.yaml:

For smoketest-downstream/recipe.yaml:

  • ❌ The homepage item is expected in the about section.
  • ❌ The recipe could do with some maintainers listed in the extra/recipe-maintainers section.
  • ❌ The recipe must have some tests.
  • ❌ license_file entry is missing, but is required.
  • ❌ conda-forge feedstocks cannot have custom Github Actions workflows. See Custom Github Actions workflows are disallowed conda-forge.github.io#2750 for more information. If you didn't add any custom workflows, please consider rerendering your feedstock to remove deprecated workflows.
  • ❌ This recipe is using a compiler, which now requires adding a build dependence on ${{ stdlib("c") }} as well. Note that this rule applies to each output of the recipe using a compiler. For further details, please see META: {{ stdlib("c") }} migration conda-forge.github.io#2102.

This message was generated by GitHub Actions workflow run https://github.com/conda-forge/conda-forge-webservices/actions/runs/42407801462. Examine the logs at this URL for more detail.

@MementoRC MementoRC changed the title ENH: Adds a linux-64 -> win-64 cross-python using conda-forge's clang_win-64 toolchain ENH: Add a linux-64 -> win-64 cross-python (clang_win-64 toolchain) Nov 7, 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 rerender

@MementoRC MementoRC changed the title ENH: Add a linux-64 -> win-64 cross-python (clang_win-64 toolchain) ENH: Add win-64 cross-python from linux-64, linux-aarch64 and osx-arm64 Nov 8, 2026
@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.

2 participants