Skip to content

Commit 29b2d42

Browse files
authored
third_party/setup.py: fix wabt platform detection on Linux (#8526)
wabt changed its release asset naming convention in version 1.0.39. On Linux, the old name `ubuntu` no longer matches the new names `linux-x64` / `linux-arm64`, causing `setup.py` to silently fail with an empty download URL and crash with `ValueError: unknown url type: ''`. The fix mirrors the existing style for `macos` and `windows` — returning a prefix that matches the asset name via the existing regex.
1 parent c8bac64 commit 29b2d42

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

third_party/setup.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -174,13 +174,13 @@ def v8_main():
174174

175175
def wabt_determine_platform():
176176
if sys.platform.startswith('linux'):
177-
return 'ubuntu'
177+
return 'linux'
178178
if sys.platform == 'darwin':
179179
return 'macos'
180180
if sys.platform == 'win32':
181181
return 'windows'
182-
print('Cannot determine platform, assuming \'ubuntu\'')
183-
return 'ubuntu'
182+
print('Cannot determine platform, assuming \'linux\'')
183+
return 'linux'
184184

185185

186186
def wabt_determine_release(platform):

0 commit comments

Comments
 (0)