forked from hbldh/bleak
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
177 lines (154 loc) · 5.63 KB
/
Copy pathpyproject.toml
File metadata and controls
177 lines (154 loc) · 5.63 KB
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
170
171
172
173
174
175
176
177
[project]
name = "bleak"
version = "3.0.2"
description = "Bluetooth Low Energy platform Agnostic Klient"
authors = [{ name = "Henrik Blidh", email = "henrik.blidh@nedomkull.com" }]
license = "MIT"
license-files = ["LICENSE"]
readme = "README.rst"
requires-python = ">=3.10"
classifiers = [
"Framework :: AsyncIO",
"Operating System :: Microsoft :: Windows :: Windows 11",
"Operating System :: POSIX :: Linux",
"Operating System :: MacOS :: MacOS X",
"Operating System :: Android",
]
dependencies = [
"async-timeout>=3.0.0; python_version<'3.11'",
"typing-extensions>=4.7.0; python_version<'3.12'",
"pyobjc-core>=10.3; platform_system=='Darwin'",
"pyobjc-framework-CoreBluetooth>=10.3; platform_system=='Darwin'",
"pyobjc-framework-libdispatch>=10.3; platform_system=='Darwin'",
"winrt-runtime>=3.1; platform_system=='Windows'",
"winrt-Windows.Devices.Bluetooth>=3.1; platform_system=='Windows'",
"winrt-Windows.Devices.Bluetooth.Advertisement>=3.1; platform_system=='Windows'",
"winrt-Windows.Devices.Bluetooth.GenericAttributeProfile>=3.1; platform_system=='Windows'",
"winrt-Windows.Devices.Enumeration>=3.1; platform_system=='Windows'",
"winrt-Windows.Devices.Radios>=3.1; platform_system=='Windows'",
"winrt-Windows.Foundation>=3.1; platform_system=='Windows'",
"winrt-Windows.Foundation.Collections>=3.1; platform_system=='Windows'",
"winrt-Windows.Storage.Streams>=3.1; platform_system=='Windows'",
"dbus-fast>=4.0.0; platform_system=='Linux'",
]
[project.urls]
Homepage = "https://github.com/hbldh/bleak"
Documentation = "https://bleak.readthedocs.io"
Changelog = "https://github.com/hbldh/bleak/blob/develop/CHANGELOG.rst"
Support = "https://github.com/hbldh/bleak/discussions"
Issues = "https://github.com/hbldh/bleak/issues"
[project.optional-dependencies]
pythonista = ["bleak-pythonista>=0.1.1"]
[dependency-groups]
docs = [
"Sphinx>=8.2.3; python_version>='3.11'",
"sphinx-rtd-theme>=3.0.2; python_version>='3.11'",
]
lint = [
"black>=24.3,<25.0",
"flake8>=7.1.1,<8.0.0",
"isort>=5.13.2,<6.0.0",
]
test = [
"pytest>=8.2.1,<9.0.0",
"pytest-asyncio>=1.2.0,<2.0.0",
"pytest-cov>=7.0.0,<8.0.0",
"bumble==0.0.226",
]
dev = [
"poethepoet>=0.45.0",
{ include-group = "docs" },
{ include-group = "lint" },
{ include-group = "test" },
]
[build-system]
requires = ["uv_build>=0.10.9,<0.12.0"]
build-backend = "uv_build"
[tool.uv.build-backend]
module-name = "bleak"
module-root = ""
[tool.isort]
profile = "black"
py_version=310
src_paths = ["bleak", "examples", "tests"]
extend_skip = [".buildozer", "docs"]
[tool.mypy]
python_version = "3.10"
disable_error_code = ["import-not-found"]
exclude = "(.venv|kivy|recipes)/"
mypy_path = "typings"
packages = ["bleak", "tests", "examples"]
[tool.pyright]
typeCheckingMode = "strict"
exclude = ["**/.venv/**", "**/kivy/**", "**/recipes/**"]
[tool.pytest.ini_options]
testpaths = ["tests"]
asyncio_mode = "auto"
asyncio_default_fixture_loop_scope = "function"
filterwarnings = [
"error",
# There is an issue with coverage binary extensions on Python 3.10 on Linux.
# Not a big deal, just reduces performance a bit.
'''ignore:Couldn't import C tracer:coverage.exceptions.CoverageWarning''',
]
addopts = """
--import-mode=importlib
--cov=bleak
--cov-branch
--cov-report html
"""
[tool.poe.executor]
type = "uv"
isolated = true
[tool.poe.tasks.test-py310]
help = "Run tests using Python 3.10"
cmd = "pytest tests -v $POE_EXTRA_ARGS"
executor = { python = "3.10", no-group = "dev", group = "test" }
[tool.poe.tasks.test-py311]
help = "Run tests using Python 3.11"
cmd = "pytest tests -v $POE_EXTRA_ARGS"
executor = { python = "3.11", no-group = "dev", group = "test" }
[tool.poe.tasks.test-py312]
help = "Run tests using Python 3.12"
cmd = "pytest tests -v $POE_EXTRA_ARGS"
executor = { python = "3.12", no-group = "dev", group = "test" }
[tool.poe.tasks.test-py313]
help = "Run tests using Python 3.13"
cmd = "pytest tests -v $POE_EXTRA_ARGS"
executor = { python = "3.13", no-group = "dev", group = "test" }
[tool.poe.tasks.test-py314]
help = "Run tests using Python 3.14"
cmd = "pytest tests -v $POE_EXTRA_ARGS"
executor = { python = "3.14", no-group = "dev", group = "test" }
[tool.poe.tasks.test-all]
help = "Run tests using all supported Python versions"
sequence = [
"test-py310",
"test-py311",
"test-py312",
"test-py313",
"test-py314",
]
[tool.poe.tasks.typecheck]
help = "Run type checkers (mypy, pyright)"
# We want always the latest version of pyright and mypy, to catch
# any breakage as soon as we can. That is why they are not dev
# dependencies in the pyproject.toml, because that would lock them to
# a specific version. Instead we install the latest version as tool.
sequence = [
{ cmd = "mypy", executor = { no-group = "dev", group = "test", with = "mypy" } },
{ cmd = "pyright", executor = { no-group = "dev", group = "test", with = "pyright" } },
]
[tool.poe.tasks.lint]
help = "Run code linters (isort, black, flake8)"
sequence = [
{ cmd = "isort . ${checkonly:+--check --diff}", executor = { no-group = "dev", group = "lint" } },
{ cmd = "isort docs ${checkonly:+--check --diff}", executor = { no-group = "dev", group = "lint" } },
{ cmd = "black . ${checkonly:+--check --diff}", executor = { no-group = "dev", group = "lint" } },
{ cmd = "flake8 . --count --show-source --statistics", executor = { no-group = "dev", group = "lint" } },
]
args = [{ name = "checkonly", type = "boolean" }]
[tool.poe.tasks.docs]
help = "Build the documentation"
cmd = "sphinx-build -b html -W -d docs/_build/doctrees docs docs/_build/html"
executor = { python = "3.11", no-group = "dev", group = "docs" }