Skip to content

Commit 2bcc97c

Browse files
committed
Add ARM64 Windows wheels to be tested and published
Fix Windows platform detection This architecture may become more common in the future, I'd rather support it now just in case.
1 parent 38978db commit 2bcc97c

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

.github/workflows/python-package.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,9 @@ jobs:
118118
- os: "windows-latest"
119119
python-version: "3.10"
120120
architecture: "x86"
121+
- os: "windows-11-arm"
122+
python-version: "3.10"
123+
architecture: "arm64"
121124
fail-fast: false
122125

123126
steps:

build_sdl.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
logger = logging.getLogger(__name__)
2929

3030

31-
BIT_SIZE, LINKAGE = platform.architecture()
31+
MACHINE = platform.machine()
3232

3333
# Reject versions of SDL older than this, update the requirements in the readme if you change this.
3434
SDL_MIN_VERSION = (3, 2, 0)
@@ -386,10 +386,10 @@ def get_cdef() -> tuple[str, dict[str, str]]:
386386
# Bundle the Windows SDL DLL.
387387
if sys.platform == "win32" and SDL_BUNDLE_PATH is not None:
388388
include_dirs.append(str(SDL_INCLUDE))
389-
ARCH_MAPPING = {"32bit": "x86", "64bit": "x64"}
390-
SDL_LIB_DIR = Path(SDL_BUNDLE_PATH, "lib/", ARCH_MAPPING[BIT_SIZE])
389+
ARCH_MAPPING = {"i386": "x86", "AMD64": "x64"}
390+
SDL_LIB_DIR = Path(SDL_BUNDLE_PATH, "lib/", ARCH_MAPPING[MACHINE])
391391
library_dirs.append(str(SDL_LIB_DIR))
392-
SDL_LIB_DEST = Path("tcod", ARCH_MAPPING[BIT_SIZE])
392+
SDL_LIB_DEST = Path("tcod", ARCH_MAPPING[MACHINE])
393393
SDL_LIB_DEST.mkdir(exist_ok=True)
394394
SDL_LIB_DEST_FILE = SDL_LIB_DEST / "SDL3.dll"
395395
SDL_LIB_FILE = SDL_LIB_DIR / "SDL3.dll"

0 commit comments

Comments
 (0)