From 22cad23cfc726b331f2436b9db751b0f0f7aa74c Mon Sep 17 00:00:00 2001 From: Michael Simacek Date: Thu, 19 Sep 2024 09:48:19 +0200 Subject: [PATCH] BUG: fix wheel platform tag for GraalPy On the JVM sys.maxsize is 2**31-1 because Java arrays can be indexed only with 32-bit indices also on 64bit platforms. Fix this by using the same default implementation as found in stdlib platform module and implemented in packaging. --- mesonpy/_tags.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mesonpy/_tags.py b/mesonpy/_tags.py index 846f4a684..37fc8411b 100644 --- a/mesonpy/_tags.py +++ b/mesonpy/_tags.py @@ -6,6 +6,7 @@ import os import platform +import struct import sys import sysconfig import typing @@ -25,7 +26,7 @@ } -_32_BIT_INTERPRETER = sys.maxsize <= 2**32 +_32_BIT_INTERPRETER = struct.calcsize('P') == 4 def get_interpreter_tag() -> str: