MIRROR: javascript for ๐Ÿœ's, a tiny runtime with big ambitions
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

add tomli support for TOML parsing in Python < 3.11

+14 -4
+2 -2
.github/workflows/build-platform.yml
··· 78 78 python3-pip ninja-build cmake pkg-config uuid-dev libssl-dev libsodium-dev jq 79 79 curl -fsSL https://deb.nodesource.com/setup_22.x | bash - 80 80 apt-get install -y nodejs 81 - pip3 install meson 81 + pip3 install meson tomli 82 82 git config --global --add safe.directory "$GITHUB_WORKSPACE" 83 83 84 84 # === LINUX MUSL SETUP === ··· 88 88 apk add --no-cache git clang lld llvm meson ninja cmake pkgconf curl npm nodejs \ 89 89 musl-dev openssl-dev openssl-libs-static libsodium-dev libsodium-static \ 90 90 util-linux-dev util-linux-static linux-headers libunwind-dev libunwind-static \ 91 - tar xz zstd jq bash 91 + py3-tomli tar xz zstd jq bash 92 92 git config --global --add safe.directory "$GITHUB_WORKSPACE" 93 93 94 94 # === MACOS SETUP ===
+12 -2
meson/messages.py
··· 1 - import tomllib, sys 1 + import sys 2 + 3 + try: 4 + import tomllib 5 + except ModuleNotFoundError: 6 + try: 7 + import tomli as tomllib 8 + except ModuleNotFoundError as exc: 9 + raise ModuleNotFoundError( 10 + "No TOML parser available. Use Python 3.11+ or install 'tomli'." 11 + ) from exc 2 12 3 13 with open(sys.argv[1], "rb") as f: 4 14 messages = tomllib.load(f)["messages"] ··· 17 27 print(f' .{name} = "{escaped}",') 18 28 print("};") 19 29 print("") 20 - print("#endif") 30 + print("#endif")