Skip to content

setup.py: honor CMAKE_GENERATOR_PLATFORM for the Windows -A flag#1547

Merged
ax3l merged 1 commit into
BLAST-ImpactX:developmentfrom
ax3l:fix-setup-py-win-arm64
Jul 6, 2026
Merged

setup.py: honor CMAKE_GENERATOR_PLATFORM for the Windows -A flag#1547
ax3l merged 1 commit into
BLAST-ImpactX:developmentfrom
ax3l:fix-setup-py-win-arm64

Conversation

@ax3l

@ax3l ax3l commented Jul 6, 2026

Copy link
Copy Markdown
Member

The Windows build hardcoded the Visual Studio target architecture to x64 for any 64-bit interpreter (if sys.maxsize > 2**32: -A x64). On win-arm64 the interpreter is 64-bit but the architecture is ARM, so this mis-targeted the build and find_package(Python) then failed. Honor an explicit CMAKE_GENERATOR_PLATFORM (e.g. "ARM64") from the environment, falling back to the previous behavior otherwise.

Same as openPMD/openPMD-api#1910

The Windows build hardcoded the Visual Studio target architecture to x64 for
any 64-bit interpreter (`if sys.maxsize > 2**32: -A x64`). On win-arm64 the
interpreter is 64-bit but the architecture is ARM, so this mis-targeted the
build and find_package(Python) then failed. Honor an explicit
CMAKE_GENERATOR_PLATFORM (e.g. "ARM64") from the environment, falling back to
the previous behavior otherwise.
@ax3l ax3l requested review from EZoni, WeiqunZhang and atmyers July 6, 2026 16:45
@ax3l ax3l added install component: python Python bindings labels Jul 6, 2026
@codspeed-hq

codspeed-hq Bot commented Jul 6, 2026

Copy link
Copy Markdown

Merging this PR will not alter performance

✅ 57 untouched benchmarks


Comparing ax3l:fix-setup-py-win-arm64 (d3d18e2) with development (0c666cb)

Open in CodSpeed

@ax3l ax3l merged commit 46215ba into BLAST-ImpactX:development Jul 6, 2026
18 checks passed
@ax3l ax3l deleted the fix-setup-py-win-arm64 branch July 6, 2026 19:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants