-
Notifications
You must be signed in to change notification settings - Fork 8
/
pyproject.toml
91 lines (78 loc) · 3.01 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
[virtualenvs]
prefer-active-python = true
[tool.poetry]
name = "krux-installer"
version = "0.0.20-beta"
description = "A GUI based application to flash Krux firmware on K210 based devices"
authors = [
"qlrd <[email protected]>"
]
license = "LICENSE"
readme = "README.md"
[tool.poetry.dependencies]
python = ">=3.9,<3.13"
kivy = "2.3.0"
kivysome = "^0.2.1"
tomli = { version = "^2.0.1", python = "<3.11" }
pyserial = "^3.5"
requests = "^2.31.0"
pyzbar = "^0.1.9"
opencv-python = "^4.9.0.80"
cryptography = "^43.0.1"
qrcode = "^8.0"
easy-i18n = "^1.2.0"
pysudoer = {git = "https://github.com/qlrd/pysudoer.git"}
pillow = "^11.0.0"
pyinstaller = "^6.10.0"
[tool.poetry.group.dev.dependencies]
black = "^24.8.0"
pylint = "^3.3.1"
pyinstaller = "^6.3.0"
pytest-cov = "^5.0.0"
poethepoet = "^0.29.0"
demjson3 = "^3.0.6"
[tool.poe.tasks]
cli = "python src/krux-installer.py"
format-src= "black ./src"
format-tests= "black ./tests"
format-e2e= "black ./e2e"
format-installer = "black ./krux-installer.py"
format = ["format-src", "format-tests", "format-e2e", "format-installer"]
test-unit = "pytest --cache-clear --cov=src/utils/constants --cov=src/utils/info --cov=src/utils/selector --cov=src/utils/downloader --cov=src/utils/trigger --cov=src/utils/flasher --cov=src/utils/unzip --cov=src/utils/signer --cov=src/utils/verifyer --cov=src/i18n --cov-branch --cov-report html ./tests"
test-e2e = "pytest --cov-append --cov=src/app --cov-branch --cov-report html ./e2e"
test = ["test-unit", "test-e2e"]
coverage-unit = "pytest --cache-clear --cov=src/utils/constants --cov=src/utils/info --cov=src/utils/selector --cov=src/utils/downloader --cov=src/utils/trigger --cov=src/utils/flasher --cov=src/utils/unzip --cov=src/utils/signer --cov=src/utils/verifyer --cov=src/i18n --cov-branch --cov-report xml ./tests"
coverage-e2e = "pytest --cov-append --cov=src/app --cov-branch --cov-report xml ./e2e"
coverage = ["coverage-unit", "coverage-e2e"]
lint.sequence = [
{ cmd = "jsonlint src/i18n/*.json"},
{ cmd = "pylint --rcfile=.pylint/src ./src" },
{ cmd = "pylint --rcfile=.pylint/tests ./tests"},
{ cmd = "pylint --rcfile=.pylint/tests ./e2e"}
]
build-linux.sequence = [
{ cmd = "sh .ci/patch-pyinstaller-kivy-hook.sh" },
{ cmd = "python .ci/create-spec.py"},
{ cmd = "python -m PyInstaller krux-installer.spec"}
]
build-macos.sequence = [
{ cmd = "find . -name '.DS_Store' -delete" },
{ cmd = "sh .ci/patch-pyinstaller-kivy-hook.sh" },
{ cmd = "python .ci/create-spec.py"},
{ cmd = "python -m PyInstaller krux-installer.spec"}
]
build-win.sequence = [
{ cmd = "powershell.exe -File .ci/patch-pyinstaller-kivy-hook.ps1" },
{ cmd = "python .ci/create-spec.py"},
{ interpreter = ["powershell", "pwsh"], shell = "& .ci/edit-spec.ps1"},
{ cmd = "python -m PyInstaller krux-installer.spec"}
]
[tool.poe.tasks.dev-debug]
env = { LOGLEVEL = "debug" }
cmd = "python krux-installer.py"
[tool.poe.tasks.dev]
env = { LOGLEVEL = "info" }
cmd = "python krux-installer.py"
[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"