Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This switches the build system to scikit-build-core and adds Windows wheels (close #9 and close #12). It drops s390x because it's missing from upstream and that causes it to be called x86: https://github.com/ggerganov/whisper.cpp/blob/8fac6455ffeb0a0950a84e790ddb74f7290d33c4/CMakeLists.txt#L473-L474 - the logic there should be changed to only add x86 specific flags if x86 is detected, not to filter all known cases that are not x86. A very recent version of CMake is required due to EXCLUDE_FROM_ALL, but scikit-build-core handles requesting it if missing for you.
Tested locally with
pipx run build --installer=uv
. Checked contents withunzip -l dist/*.whl
. Validated pyproject.toml withpipx run validate-pyproject-schema-store[all] pyproject.toml -v
. Checked the wheel withpipx run --spec delocate delocate-listdeps dist/whisper_cpp_cli-0.0.2-py3-none-macosx_14_0_x86_64.whl
(I hadBUILD_SHARED_LIBS
set toON
for a bit, somehow thinking that would build static libs when enabled...).Since there's no pre-commit file, formatted CMakeLists.txt manually with
pipx run cmake-format -I CMakeLists.txt
.Adding the other features should just be setting cmake flags; core-ml for example can be enabled by passing
-Ccmake.define.WHISPER_COREML=1
. Similarly for WHISPER_CUDA, etc.