Add musl to python bootstrapping script (#1758)

Previously, only glibc builds were tracked in the bootstrap script. A
new field `libc` tracks if `gnu` or `musl` are used on linux, while it
is `"none"` everywhere else. I've confirmed that the updated script
works on ubuntu and alpine.
This commit is contained in:
konsti
2024-02-22 10:46:48 +01:00
committed by GitHub
parent af06a6fe0a
commit e97b094bc9
3 changed files with 2955 additions and 917 deletions
+6 -1
View File
@@ -34,6 +34,7 @@ import os
import platform
import shutil
import sys
import sysconfig
import tarfile
import tempfile
import urllib.parse
@@ -102,7 +103,11 @@ if INSTALL_DIR.exists():
# Install each version
for version in versions:
key = f"{INTERPRETER}-{version}-{PLATFORM_MAP.get(PLATFORM, PLATFORM)}-{ARCH_MAP.get(ARCH, ARCH)}"
if platform.system() == "Linux":
libc = sysconfig.get_config_var("SOABI").split("-")[-1]
else:
libc = "none"
key = f"{INTERPRETER}-{version}-{PLATFORM_MAP.get(PLATFORM, PLATFORM)}-{ARCH_MAP.get(ARCH, ARCH)}-{libc}"
install_dir = INSTALL_DIR / f"{INTERPRETER}@{version}"
print(f"Installing {key}")