forked from aarnphm/whispercpp
-
Notifications
You must be signed in to change notification settings - Fork 9
/
pyproject.toml
169 lines (151 loc) · 4.03 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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
[build-system]
requires = ["setuptools>=65", "setuptools_scm[toml]>=7", "wheel"]
build-backend = "setuptools.build_meta"
[project]
name = "whispercpp"
description = "whispercpp: Pybind11 bindings for whisper.cpp"
readme = { file = "README.md", content-type = "text/markdown" }
license = { text = "Apache-2.0" }
requires-python = ">=3.8"
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"License :: OSI Approved :: Apache Software License",
"Operating System :: POSIX :: Linux",
"Topic :: Scientific/Engineering",
"Topic :: Scientific/Engineering :: Mathematics",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
"Topic :: Software Development",
"Topic :: Software Development :: Libraries",
"Topic :: Software Development :: Libraries :: Python Modules",
"Programming Language :: Python",
"Programming Language :: C++",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: Implementation :: CPython",
]
dynamic = ["version"]
[tool.setuptools_scm]
write_to = "src/whispercpp/__about__.py"
git_describe_command = "git describe --tags --first-parent"
version_scheme = "post-release"
fallback_version = "0.0.0"
[tool.setuptools.exclude-package-data]
whispercpp = ["*.cc", "*.h", "BUILD", "*.o"]
[tool.setuptools.packages.find]
where = ["src"]
include = ["whispercpp*"]
[tool.setuptools.package-data]
whispercpp = ["py.typed", "*.so", "*.pyi"]
[tool.pytest.ini_options]
addopts = [
"-rfEX",
"-vvv",
"--cov=src/whispercpp",
"--cov-report=term-missing",
"--ignore=extern",
"--ignore-glob=bazel-*",
]
python_files = ["test_*.py", "*_test.py"]
testpaths = ["tests", "examples"]
[tool.coverage.paths]
source = ["src"]
[tool.coverage.run]
branch = true
parallel = true
source = ["src/whispercpp/"]
[tool.coverage.report]
show_missing = true
precision = 2
exclude_lines = [
"\\#\\s*pragma: no cover",
"^\\s*def __repr__",
"^\\s*raise AssertionError",
"^\\s*raise NotImplementedError",
"^\\s*except ImportError",
"if __name__ == .__main__.:",
"^\\s*if ((_)?t\\.)?TYPE_CHECKING:",
"^\\s*@(t\\.)?overload( |$)",
"@(abc\\.)?abstractmethod",
]
[tool.ruff]
# similar to black's
line-length = 88
# We ignore E501 (line too long) here because we keep user-visible strings on one line.
ignore = ["E501"]
exclude = ["bazel-*/", "venv", "typings", "extern"]
target-version = "py311"
[tool.ruff.pydocstyle]
convention = "google"
[tool.ruff.isort]
lines-after-imports = 2
[tool.black]
line-length = 88
exclude = '''
(
/(
\.eggs
| \.git
| \.tox
| \.venv
| \.build
| venv
| _build
| build
| extern
| bazel-*
| lib
| dist
)/
)
'''
[tool.isort]
profile = "black"
line_length = 88
length_sort = true
force_single_line = true
order_by_type = true
known_first_party = "bentoml"
force_alphabetical_sort_within_sections = true
skip_glob = [
"test/*",
"venv/*",
"lib/*",
"bazel-*",
"extern/*",
"dist/*",
"build/*",
]
[tool.pyright]
pythonVersion = "3.11"
exclude = [
"bazel-*",
"extern",
"venv",
"node_modules",
"nix",
"setup.py",
"examples/bentoml/locustfile.py",
]
typeCheckingMode = "strict"
analysis.useLibraryCodeForTypes = true
enableTypeIgnoreComments = true
[tool.cibuildwheel]
test-requires = "pytest"
test-command = "pytest {project}/tests"
build-verbosity = "3"
manylinux-x86_64-image = "manylinux_2_28"
manylinux-i686-image = "manylinux_2_28"
manylinux-aarch64-image = "manylinux_2_28"
manylinux-ppc64le-image = "manylinux_2_28"
manylinux-s390x-image = "manylinux_2_28"
[tool.cibuildwheel.macos]
archs = ["x86_64", "arm64"]
# NOTE: 10.9 for C++11 support
environment = { RUNNER_OS = "MacOS", CC = "gcc", MACOSX_DEPLOYMENT_TARGET = "10.9" }
[tool.cibuildwheel.linux]
archs = ["x86_64", "aarch64"]
environment = { RUNNER_OS = "Linux", CC = "gcc" }