From 1f66436642dc3f6985f777b3e297f9e22714a4c8 Mon Sep 17 00:00:00 2001 From: Raivis Dejus Date: Fri, 10 Jan 2025 09:01:59 +0200 Subject: [PATCH] Fix for wheels build (#1042) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Li Chenghao (李成浩) <94270615+Chenghao999@users.noreply.github.com> --- .github/workflows/ci.yml | 2 +- poetry.lock | 2 +- pyproject.toml | 36 +++++++++++++++++++++--------------- 3 files changed, 23 insertions(+), 17 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b508f22c39..879735a8bf 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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" diff --git a/poetry.lock b/poetry.lock index 0450dd3662..909df3977b 100644 --- a/poetry.lock +++ b/poetry.lock @@ -4187,4 +4187,4 @@ testing = ["big-O", "jaraco.functools", "jaraco.itertools", "more-itertools", "p [metadata] lock-version = "2.1" python-versions = ">=3.9,<3.13" -content-hash = "2cfea0570f9ee0d63ed65a354b85cc59f4c1628c024832e6a5b4dbd08b4ec299" +content-hash = "09d83f1e4f6030e1ef5f4ba043e45baec4f749b578473f76135d392d52f3e091" diff --git a/pyproject.toml b/pyproject.toml index 9df3679d8c..0770edfc80 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -6,20 +6,31 @@ authors = [ {name = "Chidi Williams", email = "williamschidi1@gmail.com"} ] 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" @@ -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" @@ -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" @@ -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",