-
Notifications
You must be signed in to change notification settings - Fork 154
Expand file tree
/
Copy pathpyproject.toml
More file actions
136 lines (116 loc) · 3.21 KB
/
pyproject.toml
File metadata and controls
136 lines (116 loc) · 3.21 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
[build-system]
requires = ["setuptools>=77.0.3"]
build-backend = "setuptools.build_meta"
[project]
name = "west"
version = "1.5.99"
authors = [{name = "Zephyr Project", email = "[email protected]"}]
description = "Zephyr RTOS Project meta-tool"
classifiers = [
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"Operating System :: POSIX :: Linux",
"Operating System :: MacOS :: MacOS X",
"Operating System :: Microsoft :: Windows",
]
requires-python = ">=3.10"
dependencies = [
"colorama~=0.4",
"packaging~=25.0",
"pykwalify~=1.8",
"pyyaml~=6.0",
]
license = "Apache-2.0"
license-files = ["LICENSE"]
[project.readme]
file = "README.rst"
content-type = "text/x-rst"
[project.urls]
Homepage = "https://github.com/zephyrproject-rtos/west"
[project.scripts]
west = "west.app.main:main"
[dependency-groups]
lint = [
"ruff~=0.13",
]
test = [
"coverage~=7.10",
"pytest>=8.4,<10.0",
"pytest-cov~=7.0",
"pytest-xdist>=3",
]
types = [
"mypy~=1.18",
"types-pyyaml~=6.0",
]
dev = [
"poethepoet~=0.37",
{include-group = "lint"},
{include-group = "test"},
{include-group = "types"},
]
[tool.setuptools]
package-dir = {"" = "src"}
zip-safe = false
include-package-data = true
[tool.setuptools.packages.find]
where = ["src"]
namespaces = false
# Note this section is only for interactive `coverage run ...` use and ignored by "gh-test"
# below. pytest's --cov-config= option is for passing .coveragerc file syntax and it seems to
# silently ignore pyproject.toml files.
[tool.coverage.run]
patch = ["subprocess"]
relative_files = true
source = ["src/"]
[tool.coverage.paths]
source = [
"src/west",
"*/site-packages/west",
"*/src/west",
]
[tool.ruff]
line-length = 100
[tool.ruff.lint]
extend-select = [
"B", # flake8-bugbear
"E", # pycodestyle errors
"F", # Pyflakes
"I", # isort
"UP", # pyupgrade
"W", # pycodestyle warnings
]
[tool.ruff.format]
quote-style = "preserve"
line-ending = "lf"
# Enable preview mode for Github Annotations added in 0.13.3
preview = true
[tool.mypy]
mypy_path = "src"
ignore_missing_imports = true
[tool.pytest.ini_options]
# You can override any pytest option via pytest argument `-o key=value`.
# E.g. unset option `-o pythonpath=` to use the installed west in tests
pythonpath = "src"
[tool.poe.tasks.test]
cmd = "python -m pytest -W error"
env = {PYTHONIOENCODING = "utf-8"}
[tool.poe.tasks.test-xdist]
ref = "test -n auto"
[tool.poe.tasks]
lint = "ruff check ."
format = "ruff format"
types = "mypy --package west"
# work in progress
types-extra = "mypy --package west --check-untyped-defs"
all = ["test", "lint", "format", "types"]
# Github specific tasks, see comments in .github/workflows/*.yml
gh-lint = "ruff check --output-format=github ."
gh-format = "ruff format --check --output-format=github"
[tool.poe.tasks.gh-test]
# Keep the --cov= option in sync with [tool.coverage.run] above.
cmd = "python -m pytest -W error -v -o pythonpath= -o junit_family=xunit1 --junitxml=junit.xml --cov-report=html --cov=src/"
env = {PYTHONIOENCODING = "utf-8"}