-
Notifications
You must be signed in to change notification settings - Fork 958
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding cibuildwheels to build wheels (#842)
- Loading branch information
1 parent
490aa7f
commit 9877977
Showing
12 changed files
with
77 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -149,9 +149,6 @@ jobs: | |
run: gem install fpm | ||
if: "startsWith(matrix.os, 'ubuntu-')" | ||
|
||
- name: Build Wheels | ||
run: poetry build | ||
|
||
- name: Bundle | ||
run: | | ||
if [ "$RUNNER_OS" == "macOS" ]; then | ||
|
@@ -181,6 +178,7 @@ jobs: | |
elif [ "$RUNNER_OS" == "Windows" ]; then | ||
cp -r ./dll_backup ./buzz/ | ||
poetry run make bundle_windows | ||
fi | ||
|
@@ -201,35 +199,57 @@ jobs: | |
path: | | ||
dist/Buzz*-windows.exe | ||
dist/Buzz*-mac.dmg | ||
dist/buzz_*.whl | ||
publish-pypi: | ||
build_wheels: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
include: | ||
- os: macos-latest | ||
- os: windows-latest | ||
- os: ubuntu-20.04 | ||
needs: [ build, test ] | ||
if: startsWith(github.ref, 'refs/tags/') | ||
# macos-13 is an intel runner, macos-14 is apple silicon | ||
os: [ubuntu-latest, windows-latest, macos-13, macos-14] | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
submodules: recursive | ||
- uses: actions/setup-python@v5 | ||
|
||
- name: Copy Windows DLLs | ||
run: | | ||
if [ "$RUNNER_OS" == "Windows" ]; then | ||
cp -r ./dll_backup ./buzz/ | ||
fi | ||
shell: bash | ||
|
||
- name: Build wheels | ||
uses: pypa/[email protected] | ||
env: | ||
CIBW_ARCHS_WINDOWS: "auto" | ||
CIBW_ARCHS_MACOS: "universal2" | ||
CIBW_ARCHS_LINUX: "auto" | ||
|
||
- uses: actions/upload-artifact@v4 | ||
with: | ||
python-version: "3.11.9" | ||
- name: Install Poetry Action | ||
uses: snok/[email protected] | ||
name: cibw-wheels-${{ matrix.os }} | ||
path: ./wheelhouse/*.whl | ||
|
||
publish_pypi: | ||
needs: [ build_wheels, test ] | ||
runs-on: ubuntu-latest | ||
environment: pypi | ||
permissions: | ||
id-token: write | ||
if: startsWith(github.ref, 'refs/tags/') | ||
steps: | ||
- uses: actions/download-artifact@v4 | ||
with: | ||
virtualenvs-create: true | ||
virtualenvs-in-project: true | ||
- name: Publish to PyPI | ||
run: | | ||
poetry config pypi-token.pypi ${{ secrets.PYPI_TOKEN }} | ||
poetry publish --build --skip-existing | ||
pattern: cibw-* | ||
path: dist | ||
merge-multiple: true | ||
|
||
- uses: pypa/gh-action-pypi-publish@release/v1 | ||
with: | ||
verbose: true | ||
password: ${{ secrets.PYPI_TOKEN }} | ||
|
||
release: | ||
runs-on: ${{ matrix.os }} | ||
|
@@ -245,14 +265,17 @@ jobs: | |
- uses: actions/checkout@v4 | ||
with: | ||
submodules: recursive | ||
|
||
- uses: actions/download-artifact@v4 | ||
with: | ||
name: Buzz-${{ runner.os }} | ||
|
||
- name: Install Poetry Action | ||
uses: snok/[email protected] | ||
with: | ||
virtualenvs-create: true | ||
virtualenvs-in-project: true | ||
|
||
- name: Release | ||
uses: softprops/action-gh-release@v2 | ||
with: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
VERSION = "1.0.1" | ||
VERSION = "1.0.2" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,29 @@ | ||
[tool.poetry] | ||
name = "buzz-captions" | ||
version = "1.0.1" | ||
version = "1.0.2" | ||
description = "" | ||
authors = ["Chidi Williams <[email protected]>"] | ||
license = "MIT" | ||
readme = "README.md" | ||
include = ["buzz/libwhisper.*", "buzz/whisper_cpp.py", "buzz/locale/*/LC_MESSAGES/buzz.mo"] | ||
include = [ | ||
"buzz/libwhisper.*", "buzz/*.dll", "buzz/whisper_cpp.py", "buzz/locale/*/LC_MESSAGES/buzz.mo", | ||
"buzz/dll_backup/*", | ||
] | ||
repository = "https://github.com/chidiwilliams/buzz" | ||
packages = [ | ||
{ include = "buzz" }, | ||
] | ||
|
||
[project] | ||
requires-python = ">=3.9,<3.13" | ||
|
||
[tool.poetry.dependencies] | ||
python = ">=3.9.13,<3.13" | ||
python = ">=3.9,<3.13" | ||
sounddevice = "^0.4.5" | ||
humanize = "^4.4.0" | ||
PyQt6 = "^6.4.0" | ||
PyQt6 = "6.6.1" | ||
PyQt6-Qt6 = "6.6.2" | ||
PyQt6-sip = "13.6.0" | ||
openai = "^1.14.2" | ||
keyring = "^25.0.0" | ||
platformdirs = "^4.2.0" | ||
|
@@ -24,9 +32,9 @@ numpy = "^1.21.2" | |
requests = "^2.31.0" | ||
yt-dlp = "2024.3.10" | ||
stable-ts = "2.15.9" | ||
faster-whisper = "^1.0.1" | ||
faster-whisper = "1.0.1" | ||
openai-whisper = "v20231117" | ||
transformers = "^4.39.1" | ||
transformers = "4.39.1" | ||
polib = "^1.2.0" | ||
|
||
[tool.poetry.group.dev.dependencies] | ||
|