Skip to content

Wrap native win-arm64 scripts with a start /machine launcher - #6047

Merged
jaimergp merged 32 commits into
mainfrom
win-arm64-native-wrap
Jul 22, 2026
Merged

Wrap native win-arm64 scripts with a start /machine launcher#6047
jaimergp merged 32 commits into
mainfrom
win-arm64-native-wrap

Conversation

@jaimergp

@jaimergp jaimergp commented Jul 16, 2026

Copy link
Copy Markdown
Member

Description

Closes #6048 by:

  • Wrapping the CMD subprocesses with a start /mahcine launcher
  • Adjusting PROCESSOR_ARCHITECTURE and friends so they are not blindly inherited and injected from the parent process

Checklist - did you ...

  • Add a file to the news directory (using the template) for the next release's release notes?
  • Add / update necessary tests?
  • Add / update outdated documentation?

@github-project-automation github-project-automation Bot moved this to 🆕 New in 🔎 Review Jul 16, 2026
@conda-bot conda-bot added the cla-signed [bot] added once the contributor has signed the CLA label Jul 16, 2026
@codspeed-hq

codspeed-hq Bot commented Jul 16, 2026

Copy link
Copy Markdown

Merging this PR will not alter performance

✅ 5 untouched benchmarks


Comparing win-arm64-native-wrap (2ce83af) with main (f2b6617)

Open in CodSpeed

@jaimergp jaimergp closed this Jul 17, 2026
@github-project-automation github-project-automation Bot moved this from 🆕 New to 🏁 Done in 🔎 Review Jul 17, 2026
@jaimergp jaimergp reopened this Jul 17, 2026
@github-project-automation github-project-automation Bot moved this from 🏁 Done to 🏗️ In Progress in 🔎 Review Jul 17, 2026
Comment thread conda_build/windows.py Outdated
Comment thread conda_build/windows.py Outdated
@jaimergp
jaimergp marked this pull request as ready for review July 17, 2026 13:50
@jaimergp
jaimergp requested a review from a team as a code owner July 17, 2026 13:50
@jaimergp jaimergp changed the title Wrap native win-arm64 scripts with a start /machine launcher Wrap native win-arm64 scripts with a start /machine launcher Jul 17, 2026
Comment thread conda_build/windows.py
Comment on lines +342 to +344
env["PROCESSOR_ARCHITECTURE"] = build_arch
if build_arch == get_native_windows_architecture():
env.pop("PROCESSOR_ARCHITEW6432", None)

@jaimergp jaimergp Jul 17, 2026

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note these are being set to whatever os.environ carries at

get_default("PROCESSOR_ARCHITEW6432")
get_default("PROCESSOR_ARCHITECTURE")

so we need to undo that here

Comment thread conda_build/windows.py
raise OSError("This function is only supported on Windows.")

if sys.version_info >= (3, 12):
return platform.machine() or None

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will change if python/cpython#98962 is fixed and I want to push for that.

@github-project-automation github-project-automation Bot moved this from 🏗️ In Progress to ✅ Approved in 🔎 Review Jul 17, 2026
Comment thread conda_build/_rattler_build/compat.py
Comment on lines +393 to +394
${{ env.PYTEST_MARKER && '-m "' || ''}}${{ env.PYTEST_MARKER }}${{ env.PYTEST_MARKER && '"' || ''}}
${{ matrix.pytest-expression && '-k "' || ''}}${{ matrix.pytest-expression }}${{ matrix.pytest-expression && '"' || ''}}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe these lines are sufficiently complex enough to warrant a comment? 😅 I'm struggling to understand exactly what this is doing. Especially because of the doubled env.PYTEST_MARKER and matrix.pytest-expression usage.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are ternary operators in JavaScript, adapted to Github Actions. Equivalent to '-m "' if env.PYTEST_MARKER else ''. So if PYTEST_MARKER is set, then we write -m "{{ env.PYTEST_MARKER }}".

@jaimergp
jaimergp merged commit e21a7fc into main Jul 22, 2026
27 checks passed
@jaimergp
jaimergp deleted the win-arm64-native-wrap branch July 22, 2026 13:57
@github-project-automation github-project-automation Bot moved this from ✅ Approved to 🏁 Done in 🔎 Review Jul 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed [bot] added once the contributor has signed the CLA

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

PROCESSOR_ARCHITECTURE inherited from parent process causes mismatch with non-default build_platform

6 participants