Skip to content

Commit

Permalink
Enhance build workflow: Integrate cibuildwheel for multi-platform whe…
Browse files Browse the repository at this point in the history
…el builds and update long description in setup.py
  • Loading branch information
royshil committed Nov 8, 2024
1 parent 18f5d3a commit 0cb62c9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
10 changes: 4 additions & 6 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,23 +43,23 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install numpy cmake wheel setuptools build
pip install numpy cmake wheel setuptools build cibuildwheel
- name: Build wheel
env:
SIMPLER_WHISPER_ACCELERATION: ${{ matrix.acceleration }}
SIMPLER_WHISPER_PLATFORM: ${{ matrix.platform }}
SIMPLER_WHISPER_PYTHON_VERSION: ${{ matrix.python-version }}
CIBW_BUILD: cp${{ matrix.python-version == '3.11' && '311' || '312' }}-*
CIBW_SKIP: "*-musllinux_*" # Skip musllinux builds unless you need them
run: |
python setup.py build_ext --inplace
python -m build --wheel
python -m cibuildwheel --output-dir dist
- name: Install built wheel Non-Windows
if: startsWith(matrix.os, 'windows') == false
run: |
pip install dist/*.whl
# store wheel name on github env for later use
echo "WHEEL_FILE=$(basename $(ls dist/*.whl))" >> $GITHUB_ENV
- name: Install built wheel Windows
Expand All @@ -73,8 +73,6 @@ jobs:
}
Write-Output "Installing wheel file: $($wheelFile.FullName)"
pip install $wheelFile.FullName
# store wheel name on github env for later use
echo "WHEEL_FILE=$($wheelFile.Name)" >> $env:GITHUB_ENV
- name: Test import
Expand Down
3 changes: 2 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,8 @@ def get_tag(self):
author="Roy Shilkrot",
author_email="[email protected]",
description="A simple Python wrapper for whisper.cpp",
long_description="A simple Python wrapper for whisper.cpp",
long_description=open("README.md").read(),
long_description_content_type="text/markdown",
ext_modules=[CMakeExtension("simpler_whisper._whisper_cpp")],
cmdclass={
"build_ext": CMakeBuild,
Expand Down

0 comments on commit 0cb62c9

Please sign in to comment.