-
Notifications
You must be signed in to change notification settings - Fork 9
/
pyproject.toml
68 lines (57 loc) · 2.15 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
[tool.ruff]
line-length = 100
extend-exclude = [
"pki",
"doc",
"scripts/**",
]
target-version = "py38"
[tool.ruff.lint]
# See: https://docs.astral.sh/ruff/rules/ for details
select = ["ALL"]
ignore = [
"COM812", # Conflicts with the formatter
"ISC001", # Conflicts with the formatter
"ANN101", # "missing-type-self"
"PLE0605", # ruff does not handle += in __all__
"FBT", # don't care for these at the moment
"PT001", # https://github.com/astral-sh/ruff/issues/8796#issuecomment-1825907715
"PT004", # https://github.com/astral-sh/ruff/issues/8796#issuecomment-1825907715
"PT005", # https://github.com/astral-sh/ruff/issues/8796#issuecomment-1825907715
"PT023", # https://github.com/astral-sh/ruff/issues/8796#issuecomment-1825907715
]
pyupgrade.keep-runtime-typing = true
pylint.max-args = 8
[tool.ruff.lint.pydocstyle]
convention = "pep257"
[tool.ruff.format]
quote-style = "double"
indent-style = "space"
skip-magic-trailing-comma = false
line-ending = "auto"
[tool.mypy]
warn_return_any = true
exclude = [
"^build.*",
"^doc.*",
"^scripts/menuconfig\\.py$"
]
[tool.cibuildwheel]
skip = ["*-musl*", "pp*", "*linux_i686", "*win32*"]
[tool.cibuildwheel.linux]
before-all = "yum install -y libusbx-devel"
[tool.cibuildwheel.windows]
before-build = "pip install delvewheel "
repair-wheel-command = "delvewheel show {wheel} --ignore-in-wheel && delvewheel repair -w {dest_dir} --ignore-in-wheel {wheel} --add-path vcpkg_installed\\x64-windows\\bin"
# The 'PB_MACOS_ARCH' environment variable is picked up by setup.py to link
# against the correct libusb library. I've not found a nicer way to figure
# out the target architecture in setup.py when cross compiling on an x86_64 host.
[[tool.cibuildwheel.overrides]]
select = "*-macosx_arm64"
environment = "PB_MACOS_ARCH=arm64"
[[tool.cibuildwheel.overrides]]
select = "*-macosx_x86_64"
environment = "PB_MACOS_ARCH=x86_64"
[tool.cibuildwheel.macos]
archs = ["x86_64", "arm64"]
repair-wheel-command = "DYLD_LIBRARY_PATH=libusb_{delocate_archs}/1.0.27/lib delocate-wheel --require-target-macos-version 12.0 --require-archs {delocate_archs} -w {dest_dir} -v {wheel}"