Skip to content

Commit c0e2246

Browse files
committed
build: add Emscripten exclusion markers and CI safety rails
1 parent 7fa679e commit c0e2246

2 files changed

Lines changed: 19 additions & 15 deletions

File tree

.github/workflows/publish-wheels.yml

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,9 @@ on:
44
workflow_dispatch:
55
inputs:
66
tag:
7-
description: 'Tag to publish (e.g. v3.3.1)'
8-
required: true
7+
description: 'Tag or branch (e.g. v3.3.1 or development)'
8+
required: false
9+
default: 'development'
910

1011
permissions:
1112
contents: write
@@ -15,7 +16,7 @@ jobs:
1516
# ── Linux x86_64 manylinux (cp37-abi3) ──────────────────────────────────
1617
build-linux-x86_64-glibc:
1718
name: "linux x86_64 glibc"
18-
runs-on: self-hosted
19+
runs-on: [self-hosted, Linux, X64]
1920
steps:
2021
- uses: actions/checkout@v4
2122
with:
@@ -42,7 +43,7 @@ jobs:
4243
# ── Linux aarch64 manylinux (cp37-abi3) ─────────────────────────────────
4344
build-linux-aarch64-glibc:
4445
name: "linux aarch64 glibc"
45-
runs-on: self-hosted
46+
runs-on: [self-hosted, Linux, X64]
4647
steps:
4748
- uses: actions/checkout@v4
4849
with:
@@ -69,7 +70,7 @@ jobs:
6970
# ── Linux x86_64 musllinux (cp37-abi3) ──────────────────────────────────
7071
build-linux-x86_64-musl:
7172
name: "linux x86_64 musl"
72-
runs-on: self-hosted
73+
runs-on: [self-hosted, Linux, X64]
7374
steps:
7475
- uses: actions/checkout@v4
7576
with:
@@ -96,7 +97,7 @@ jobs:
9697
# ── Linux aarch64 musllinux (cp37-abi3) ─────────────────────────────────
9798
build-linux-aarch64-musl:
9899
name: "linux aarch64 musl"
99-
runs-on: self-hosted
100+
runs-on: [self-hosted, Linux, X64]
100101
steps:
101102
- uses: actions/checkout@v4
102103
with:
@@ -123,7 +124,7 @@ jobs:
123124
# ── Windows AMD64 ────────────────────────────────────────────────────────
124125
build-win-amd64:
125126
name: "windows amd64"
126-
runs-on: self-hosted
127+
runs-on: [self-hosted, Windows, X64]
127128
steps:
128129
- uses: actions/checkout@v4
129130
with:
@@ -144,7 +145,7 @@ jobs:
144145
# ── Windows ARM64 ────────────────────────────────────────────────────────
145146
build-win-arm64:
146147
name: "windows arm64"
147-
runs-on: self-hosted
148+
runs-on: [self-hosted, Windows, X64]
148149
steps:
149150
- uses: actions/checkout@v4
150151
with:
@@ -242,13 +243,15 @@ jobs:
242243
run: ls -lh dist/
243244

244245
- name: Upload to GitHub Release
246+
if: startsWith(inputs.tag, 'v')
245247
uses: softprops/action-gh-release@v2
246248
with:
247249
tag_name: ${{ inputs.tag }}
248250
files: dist/*.whl
249251
fail_on_unmatched_files: false
250252

251253
- name: Publish to PyPI
254+
if: startsWith(inputs.tag, 'v')
252255
uses: pypa/gh-action-pypi-publish@release/v1
253256
with:
254257
packages-dir: dist/

pyproject.toml

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[build-system]
22
# Python 3.7 compatible setuptools (newer versions require Python 3.8+)
3-
requires = ["setuptools>=50.0,<70.0", "wheel", "packaging>=21.3"]
3+
requires = ["setuptools>=50.0,<75.0", "wheel", "packaging>=21.3"]
44
build-backend = "build_hooks"
55
backend-path = ["."]
66

@@ -39,9 +39,9 @@ classifiers = [
3939
]
4040

4141
dependencies = [
42-
"uv_ffi>=0.10.8.post7 ; python_version >= '3.8' and python_version <= '3.14'",
42+
"uv_ffi>=0.10.8.post7 ; python_version >= '3.8' and python_version <= '3.14' and platform_system != 'Emscripten'",
4343
"requests>=2.20",
44-
"psutil>=5.9.0",
44+
"psutil>=5.9.0 ; platform_system != 'Emscripten'",
4545
"typer>=0.4.0",
4646
"rich>=10.0.0",
4747

@@ -92,10 +92,11 @@ dependencies = [
9292
# cryptography - version split by Python
9393
# Python 3.7: stuck at 45.0.7 (upstream dropped 3.7 before 46.x)
9494
# CVEs unresolved: CVE-2026-26007 (HIGH), CVE-2026-34073 (LOW), CVE-2026-39892 (MODERATE)
95-
# TODO: cryptography-lts needed for py37 to backport fixes landing in 46.0.5–46.0.7
96-
"cryptography>=45.0.7,<46.0; python_version == '3.7'", # UNSAFE: 3 open CVEs, best available
97-
"cryptography>=46.0.7; python_version >= '3.8'", # fully patched
98-
95+
# TODO: cryptography-lts needed for py37 to backport fixes landing in 46.0.5–46.0.7
96+
"cryptography>=46.0.7 ; python_version >= '3.8' and platform_system != 'Emscripten'", # fully patched
97+
"cryptography>=45.0.7,<46.0 ; python_version == '3.7' and platform_system != 'Emscripten'", # UNSAFE: 3 open CVEs, best available
98+
"cryptography-wasm>=42.0.2 ; platform_system == 'Emscripten'",
99+
99100
# Security scanning
100101
# safety moved to optional 'audit' extra due to CVE-2025-14009 in nltk dependency
101102
# pip-audit is now the primary default scanner for all versions

0 commit comments

Comments
 (0)