-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpyproject.toml
101 lines (89 loc) · 2.59 KB
/
pyproject.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
[build-system]
requires = ["setuptools>=45", "wheel", "cmake>=3.12", "numpy<=1.26.4"]
build-backend = "setuptools.build_meta"
[project]
name = "simpler-whisper"
dynamic = ["version"]
authors = [
{name = "Roy Shilkrot", email = "[email protected]"},
]
description = "A simple Python wrapper for whisper.cpp"
readme = "README.md"
requires-python = ">=3.10"
classifiers = [
"Development Status :: 3 - Alpha",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
]
dependencies = [
"numpy",
]
[project.optional-dependencies]
test = [
"pytest>=7.0",
"requests>=2.0.0",
]
[project.urls]
"Homepage" = "https://github.com/locaal-ai/simpler-whisper"
"Bug Tracker" = "https://github.com/locaal-ai/simpler-whisper/issues"
[tool.setuptools]
packages = ["simpler_whisper"]
[tool.pytest]
testpaths = ["tests"]
python_files = "test_*.py"
python_classes = "Test*"
python_functions = "test_*"
[tool.cibuildwheel]
# Environment variables
environment = { PIP_PREFER_BINARY="1" }
# Build configuration
build-verbosity = 1
# Test configuration
test-command = """
python -c "
import os
import sys
import site
site.addsitedir(os.path.abspath('..'))
print('Python path:', sys.path)
print('Working directory:', os.getcwd())
print('Directory listing:', os.listdir())
print('Parent directory:', os.listdir('..'))
try:
import simpler_whisper
print('simpler_whisper found at:', simpler_whisper.__file__)
except ImportError as e:
print('Failed to import simpler_whisper:', e)
"
pytest {project}/tests
"""
test-extras = ["test"]
# Before test configuration
before-test = """
pip install pytest requests numpy
python -c "
import os
import requests
model_url = 'https://ggml.ggerganov.com/ggml-model-whisper-tiny.en-q5_1.bin'
model_path = 'ggml-tiny.en-q5_1.bin'
if not os.path.exists(model_path):
print('Downloading whisper model...')
response = requests.get(model_url)
with open(model_path, 'wb') as f:
f.write(response.content)
print('Model downloaded successfully')
"
"""
[tool.cibuildwheel.macos]
environment = { MACOSX_DEPLOYMENT_TARGET="10.13" }
repair-wheel-command = """
MACOSX_DEPLOYMENT_TARGET=10.13 delocate-wheel --require-archs {delocate_archs} -w {dest_dir} {wheel}
"""
test-skip = "*_universal2:*"
[tool.cibuildwheel.linux]
test-skip = "*"