Skip to content

Commit 615f6b0

Browse files
msimacekdnicolodi
authored andcommitted
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.
1 parent 04e0066 commit 615f6b0

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

mesonpy/_tags.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
import os
88
import platform
9+
import struct
910
import sys
1011
import sysconfig
1112
import typing
@@ -25,7 +26,7 @@
2526
}
2627

2728

28-
_32_BIT_INTERPRETER = sys.maxsize <= 2**32
29+
_32_BIT_INTERPRETER = struct.calcsize('P') == 4
2930

3031

3132
def get_interpreter_tag() -> str:

0 commit comments

Comments
 (0)