Skip to content

Commit 0c8510d

Browse files
committed
Disable 32-bit interpreter hack when using build-details.json
Signed-off-by: Michał Górny <mgorny@quansight.com>
1 parent 77f6e9f commit 0c8510d

1 file changed

Lines changed: 8 additions & 4 deletions

File tree

‎mesonpy/_tags.py‎

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ def get_abi_tag(build_details: BuildDetails | None = None) -> str:
9191
return abi.replace('.', '_').replace('-', '_')
9292

9393

94-
def _get_macosx_platform_tag() -> str:
94+
def _get_macosx_platform_tag(build_details: BuildDetails | None = None) -> str:
9595
ver, _, arch = platform.mac_ver()
9696

9797
# Override the architecture with the one provided in the
@@ -151,7 +151,9 @@ def _get_macosx_platform_tag() -> str:
151151
# the patch level. Reset the patch level to zero.
152152
minor = 0
153153

154-
if _32_BIT_INTERPRETER:
154+
# When using build-details.json, the platform recorded should be correct
155+
# per the bitness of the interpreter.
156+
if build_details is None and _32_BIT_INTERPRETER:
155157
# 32-bit Python running on a 64-bit kernel.
156158
if arch == 'ppc64':
157159
arch = 'ppc'
@@ -185,10 +187,12 @@ def get_platform_tag(build_details: BuildDetails | None = None) -> str:
185187
platform = build_details['platform']
186188

187189
if platform.startswith('macosx'):
188-
return _get_macosx_platform_tag()
190+
return _get_macosx_platform_tag(build_details)
189191
if platform.startswith('ios'):
190192
return _get_ios_platform_tag()
191-
if _32_BIT_INTERPRETER:
193+
# When using build-details.json, the platform recorded should be correct
194+
# per the bitness of the interpreter.
195+
if build_details is None and _32_BIT_INTERPRETER:
192196
# 32-bit Python running on a 64-bit kernel.
193197
if platform == 'linux-x86_64':
194198
return 'linux_i686'

0 commit comments

Comments
 (0)