Skip to content

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

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

setup.py: honor CMAKE_GENERATOR_PLATFORM for the Windows -A flag#7019
EZoni merged 1 commit into
BLAST-WarpX: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:46
@EZoni
EZoni merged commit 93de007 into BLAST-WarpX:development Jul 6, 2026
51 checks passed
@EZoni EZoni self-assigned this Jul 6, 2026
@ax3l
ax3l deleted the fix-setup-py-win-arm64 branch July 6, 2026 19:20
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