-
Notifications
You must be signed in to change notification settings - Fork 24
/
Copy pathpyproject.toml
259 lines (225 loc) · 7 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
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
[project]
name = "spsdk"
dynamic = ["dependencies", "version"]
description = "Open Source Secure Provisioning SDK for NXP MCU/MPU"
readme = "README.md"
authors = [{name = "NXP", email = "michal.starecek@nxp.com"}]
license = {text = "BSD-3-Clause"}
requires-python = ">=3.9"
classifiers = [
"Development Status :: 3 - Alpha",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Operating System :: POSIX :: Linux",
"Operating System :: Microsoft :: Windows",
"Operating System :: MacOS :: MacOS X",
"License :: OSI Approved :: BSD License",
"Topic :: Scientific/Engineering",
"Topic :: Software Development :: Embedded Systems",
"Topic :: System :: Hardware",
"Topic :: Utilities",
]
[tool.setuptools]
packages = ["spsdk"]
[tool.setuptools.dynamic]
dependencies = { file = ["requirements.txt"] }
[project.urls]
"Code" = "https://github.com/NXPmicro/spsdk"
"Issue tracker" = "https://github.com/NXPmicro/spsdk/issues"
"Documentation" = "https://spsdk.readthedocs.io"
[project.optional-dependencies]
tp = ["pyscard==2.0.2"]
examples = ["flask", "requests", "ipython", "notebook", "ipywidgets"]
dk6 = ["pyftdi", "pylibftdi", "ftd2xx"]
oscca = ["gmssl>=3.2,<4"]
can = ["python-can<4.5,>=4.4"]
pqc = ["spsdk-pqc<1.0,>=0.5.0"]
all = [
"spsdk[tp]",
"spsdk[examples]",
"spsdk[dk6]",
"spsdk[oscca]",
"spsdk[can]",
"spsdk[pqc]",
]
[project.scripts]
pfr = "spsdk.apps.pfr:safe_main"
blhost = "spsdk.apps.blhost:safe_main"
sdphost = "spsdk.apps.sdphost:safe_main"
sdpshost = "spsdk.apps.sdpshost:safe_main"
spsdk = "spsdk.apps.spsdk_apps:safe_main"
nxpdebugmbox = "spsdk.apps.nxpdebugmbox:safe_main"
nxpcrypto = "spsdk.apps.nxpcrypto:safe_main"
nxpdevscan = "spsdk.apps.nxpdevscan:safe_main"
nxpdevhsm = "spsdk.apps.nxpdevhsm:safe_main"
nxpele = "spsdk.apps.nxpele:safe_main"
nxpdice = "spsdk.apps.nxpdice:safe_main"
nxpimage = "spsdk.apps.nxpimage:safe_main"
nxpmemcfg = "spsdk.apps.nxpmemcfg:safe_main"
nxpuuu = "spsdk.apps.nxpuuu:safe_main"
nxpwpc = "spsdk.apps.nxpwpc:safe_main"
shadowregs = "spsdk.apps.shadowregs:safe_main"
nxpfuses = "spsdk.apps.nxpfuses:safe_main"
ifr = "spsdk.apps.ifr:safe_main"
tpconfig = "spsdk.apps.tpconfig:safe_main"
tphost = "spsdk.apps.tphost:safe_main"
dk6prog = "spsdk.apps.dk6prog:safe_main"
el2go-host = "spsdk.apps.el2go:safe_main"
lpcprog = "spsdk.apps.lpcprog:safe_main"
[build-system]
requires = ["setuptools_scm<8.2", "setuptools>=72.1,<74", "wheel"]
[tool.black]
line-length = 100
target-version = ['py39', 'py310', 'py311', 'py312', 'py313']
include = '\.pyi?$'
force-exclude = '''
'''
[tool.isort]
multi_line_output = 3
include_trailing_comma = true
force_grid_wrap = 0
use_parentheses = true
ensure_newline_before_comments = true
line_length = 100
[tool.mypy]
disallow_untyped_defs = true
ignore_missing_imports = true
warn_unused_ignores = false
[tool.pytest.ini_options]
junit_family = "xunit1"
[tool.coverage.report]
exclude_lines = [
"pragma: no cover",
"raise NotImplementedError()",
"raise SPSDKErrorImplemented()",
"safe_main()",
"sys.exit(main())",
]
[tool.coverage.run]
relative_files = true
[tool.pydocstyle]
convention = "google"
add_ignore = "D105,D301"
match = '(?!test_|__version__).*\.py'
[tool.bandit]
# B101: Use of assert
# B110: Try, Except, Pass detected
# B301: pickle
# B403: import pickle
# B404: import subprocess
# B603: subprocess without shell=True
skips = ["B101", "B110", "B301", "B403", "B404", "B603"]
[tool.setuptools_scm]
version_file = "spsdk/__version__.py"
version_scheme = "spsdk.versioning:run"
git_describe_command = 'git describe --tags --long --match "v[0-9].*"'
[tool.py_headers]
excluded_files = ["docs/conf.py", "spsdk/__version__.py"]
[tool.copyright]
excluded_files = [
"docs/conf.py",
".pre-commit-config.yaml",
".readthedocs.yml",
"spsdk/__version__.py",
]
[tool.gitcov]
skip-files = ""
repo-path = "."
module = "spsdk"
coverage-report = "reports/coverage.xml"
coverage-cutoff = 0.8
parent-branch = "origin/master"
include-merges = 0
verbose = 0
debug = 0
full-file-test = 0
[tool.checker_jupiter]
[tool.checker_jupiter.exceptions]
"examples/sdp/mx815_write_file.ipynb" = [1]
"examples/imx93/imx93_ahab_uboot.ipynb" = [10]
"examples/imx93/imx93_signed_ahab_uboot.ipynb" = [10]
[tool.checker_dependencies]
root_package = "spsdk"
[tool.checker_dependencies.spdx]
"Apache-2.0" = [
"Apache 2.0",
"Apache-2.0 License",
"Apache Software License 2.0",
"Apache License, Version 2.0",
"Apache License 2.0",
"Apache Software License",
]
"BSD-2-Clause" = ["BSD 2-Clause License"]
"BSD-3-Clause" = [
"BSD License",
"BSD 3-Clause",
"BSD (3 clause)",
"BSD 3-Clause License",
"Modified BSD License",
]
"MIT" = ["MIT License", "MIT license"]
"MPL-2.0" = ["MPL 2.0", "Mozilla Public License 2.0 (MPL 2.0)"]
"NLPL" = ["Public domain", "Public Domain"]
"PSF-2.0" = ["PSF", "PSFL", "Python Software Foundation License"]
"LGPL-3.0" = []
"LGPL-2.0" = ["GPL-2.0-or-later"]
"LGPL-2.1" = ["LGPL-2.1-or-later"]
"ISC" = ["ISC license"]
"Unlincense" = ["The Unlicense", "The Unlicense (Unlicense)"]
[tool.nxp_codecheck]
# Reports output directory
git_parent_branch = "origin/master"
output_directory = "reports"
default_check_paths = ["spsdk", "tools"]
jupyter_check_paths = ["examples"]
checkers = [
{ "pytest" = { timeout = 1200 } },
{ "gitcov" = { info_only = true } },
{"pylint" = { timeout = 300 } },
{ "mypy" = { timeout = 300 } },
"dependencies",
"pydocstyle",
"ruff",
{ "radon_c" = { info_only = true, timeout = 60 } },
{ "radon_d" = { timeout = 60 } },
{ "black" = { timeout = 120 } },
{ "isort" = { timeout = 60 } },
"copyright",
"py_headers",
{ "cyclic" = { info_only = true, check_paths = [
"spsdk",
] } },
{ "cspell" = { info_only = true } },
{ "bandit" = { info_only = true } },
"black_nb",
"isort_nb",
"jupyter",
]
[tool.release-tools]
[tool.release-tools.docs]
install_hook = ['uv pip install ".[all]" -r docs/requirements.txt']
docs_directory = "docs"
# Disable JIRA upload due to artifacts size
disable_jira_upload = true
[tool.release-tools.clr]
install_hook = ['uv pip install ".[all]"']
check_directories = ["spsdk", "tests", "tools", "examples"]
excluded_files = ["spsdk/__version__.py"]
[tool.release-tools.scr]
scr_file = "SW_Content_Register_SPSDK.txt"
[tool.release-tools.testpypi]
test_cmd = "spsdk --version"
[tool.release-tools.test_artifacts_collector.jenkins_jobs]
spsdk_full_test_scope_macos = { artifact_regex = ".*results.xml" }
spsdk_full_test_scope_ubuntu = { artifact_regex = ".*results.xml" }
spsdk_full_test_scope_win10 = { artifact_regex = ".*results.xml" }
spsdk_full_test_scope_win11 = { artifact_regex = ".*results.xml" }
[tool.release-tools.blackduck.env]
PROTEX_PROJECT_ID = "c_spsdk_automation_19733"
PROTEX_TEMPLATE = "t_reportwithobligations_7215"
[tool.check-wheel-contents]
ignore = "W002" # Wheel contains duplicate files