Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 37 additions & 0 deletions .github/workflows/python-compatibility.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,40 @@ jobs:

- name: Test import
run: uv run python -c "import whispermlx; print('Successfully imported whispermlx')"

# The job above installs from uv.lock, so it never exercises the resolution
# a downstream `pip install whispermlx` actually performs. This one builds
# the wheel and installs it from outside the project tree, where neither the
# lockfile nor [tool.uv] settings apply — the same inputs PyPI users get.
Comment on lines +41 to +44

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove explanatory comment

install-from-metadata:
runs-on: macos-latest # Apple Silicon — required for mlx-whisper
permissions:
contents: read
strategy:
matrix:
python-version: ["3.10", "3.13"]

steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
persist-credentials: false

- name: Install uv
uses: astral-sh/setup-uv@d4b2f3b6ecc6e67c4457f6d3e41ec42d3d0fcb86 # v5.4.2
with:
python-version: ${{ matrix.python-version }}

- name: Build wheel
run: uv build --wheel

- name: Install the wheel outside the project tree
run: |
workdir="$(mktemp -d)"
cd "$workdir"
uv venv --python "${{ matrix.python-version }}"
uv pip install "$GITHUB_WORKSPACE"/dist/*.whl
# whispermlx imports its implementation modules lazily, so the package
# root alone loads neither numba nor llvmlite — the pair this job exists
# to guard. Import them explicitly.
uv run --no-project python -c "import whispermlx, numba, llvmlite; print('Successfully imported whispermlx, numba and llvmlite')"
6 changes: 6 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@ license = { text = "BSD-2-Clause" }
dependencies = [
"mlx-whisper>=0.4.0",
"nltk>=3.9.1",
# mlx-whisper depends on numba without a lower bound. Resolving from
# published metadata, numpy floats to >=2.5 and numba (capped at
# numpy<2.5) is backtracked to 0.53.1, which pulls llvmlite 0.36 and
# fails to build on Python >=3.10. 0.61 is the first release supporting
# modern numpy and Python 3.13.
"numba>=0.61",
Comment on lines +14 to +19

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove explanatory comment

"numpy>=2.1.0",
"omegaconf>=2.3.0",
"pandas>=2.2.3",
Expand Down
64 changes: 33 additions & 31 deletions uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading