Skip to content

Commit 6faa814

Browse files
Eridanus117Eridanus117claude
authored
Build sdist in split-package mode so its metadata matches the wheels (k2-fsa#3690)
The published wheels are built with SHERPA_ONNX_SPLIT_PYTHON_PACKAGE=ON, so their metadata declares `sherpa-onnx-core==<version>`. The sdist, however, is built without that variable, so `need_split_package()` returns False and `install_requires` becomes None -- the sdist's Requires-Dist omits sherpa-onnx-core entirely. Tools that resolve dependencies from sdist metadata (notably `uv lock`) therefore produce a lockfile without sherpa-onnx-core. After `uv sync`, only sherpa-onnx is installed and `import sherpa_onnx` fails with a missing libonnxruntime dylib, even though a direct `uv pip install` works. Setting SHERPA_ONNX_SPLIT_PYTHON_PACKAGE=ON for the sdist build makes the sdist's metadata declare the same core dependency as the wheels. Fixes k2-fsa#3689 Co-authored-by: Eridanus117 <eridani117@gmail.com> Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent feb870c commit 6faa814

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

.github/workflows/build-wheels-linux.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -425,6 +425,12 @@ jobs:
425425
- name: Build sdist
426426
if: matrix.python-version == 'cp38' && matrix.manylinux == 'manylinux2014'
427427
shell: bash
428+
env:
429+
# Build the sdist in split-package mode so its metadata declares the
430+
# sherpa-onnx-core dependency, matching the published wheels. Without
431+
# this, the sdist's Requires-Dist omits sherpa-onnx-core, which breaks
432+
# tools that resolve from sdist metadata (e.g. `uv lock`). See #3689.
433+
SHERPA_ONNX_SPLIT_PYTHON_PACKAGE: ON
428434
run: |
429435
python3 setup.py sdist
430436
ls -l dist/*

0 commit comments

Comments
 (0)