Skip to content

Commit

Permalink
Fix for wheels build (#1042)
Browse files Browse the repository at this point in the history
Co-authored-by: Li Chenghao (李成浩) <[email protected]>
  • Loading branch information
raivisdejus and Chenghao999 committed Jan 31, 2025
1 parent 3310fca commit 1f66436
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 17 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ jobs:
shell: bash

- name: Build wheels
uses: pypa/cibuildwheel@v2.19.2
uses: pypa/cibuildwheel@v2.22.0
env:
CIBW_ARCHS_WINDOWS: "auto"
CIBW_ARCHS_MACOS: "universal2"
Expand Down
2 changes: 1 addition & 1 deletion poetry.lock

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

36 changes: 21 additions & 15 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,31 @@ authors = [
{name = "Chidi Williams", email = "[email protected]"}
]
readme = "README.md"
license = { text = "MIT" }
repository = "https://github.com/chidiwilliams/buzz"
documentation = "https://chidiwilliams.github.io/buzz/docs"
requires-python = ">=3.9,<3.13"
dynamic = [ "dependencies" ]


[project.scripts]
buzz = "buzz.buzz:main"

[tool.poetry]
license = "MIT"
include = [
"buzz/libwhisper.*", "buzz/libwhisper-coreml.*", "buzz/*.dll", "buzz/whisper_cpp.py", "buzz/locale/*/LC_MESSAGES/buzz.mo",
"buzz/dll_backup/*",
]
repository = "https://github.com/chidiwilliams/buzz"
packages = [
{ include = "buzz" },
]
include = [
{ path = "buzz/libwhisper.*", format = ["sdist", "wheel"] },
{ path = "buzz/libwhisper-coreml.*", format = ["sdist", "wheel"] },
{ path = "buzz/*.dll", format = ["sdist", "wheel"] },
{ path = "buzz/whisper_cpp.py", format = ["sdist", "wheel"] },
{ path = "buzz/locale/*/LC_MESSAGES/buzz.mo", format = ["sdist", "wheel"] },
{ path = "buzz/dll_backup/*", format = ["sdist", "wheel"] },
]

[[tool.poetry.source]]
name = "PyPI"
priority = "primary"

[[tool.poetry.source]]
name = "torch"
Expand Down Expand Up @@ -48,11 +59,11 @@ accelerate = "^1.0.1"
polib = "^1.2.0"
srt-equalizer = "^0.1.10"
torch = [
{version = "2.2.1", source = "pypi", markers = "sys_platform != 'win32' and sys_platform != 'msys'"},
{version = "2.2.1", source = "PyPI", markers = "sys_platform != 'win32' and sys_platform != 'msys'"},
{version = "2.2.1+cu121", source = "torch", markers = "sys_platform == 'win32' or sys_platform == 'msys'"},
]
torchaudio = [
{version = "2.2.1", source = "pypi", markers = "sys_platform != 'win32' and sys_platform != 'msys'"},
{version = "2.2.1", source = "PyPI", markers = "sys_platform != 'win32' and sys_platform != 'msys'"},
{version = "2.2.1+cu121", source = "torch", markers = "sys_platform == 'win32' or sys_platform == 'msys'"},
]
darkdetect = "^0.8.0"
Expand All @@ -61,8 +72,6 @@ demucs = {git = "https://github.com/raivisdejus/demucs", rev = "27c6425"}
[tool.poetry.group.dev.dependencies]
autopep8 = "^1.7.0"
pyinstaller = "^6.5.0"
# Lock to 2023.11 to fix error in 2023.12:
# AttributeError: module 'dataclasses' has no attribute '__version__'
pyinstaller-hooks-contrib = "^2024.3"
six = "^1.16.0"
pytest = "^7.1.3"
Expand All @@ -81,15 +90,12 @@ cmake = "^3.26.4"
polib = "^1.2.0"

[build-system]
requires = ["poetry-core", "ctypesgen", "setuptools", "cmake", "polib"]
requires = ["poetry-core>=2.0.0", "ctypesgen", "setuptools", "cmake", "polib"]
build-backend = "poetry.core.masonry.api"

[tool.poetry.build]
script = "build.py"

[tool.poetry.scripts]
buzz = "buzz.buzz:main"

[tool.ruff]
exclude = [
"**/whisper.cpp",
Expand Down

0 comments on commit 1f66436

Please sign in to comment.