-
Notifications
You must be signed in to change notification settings - Fork 19
Expand file tree
/
Copy pathMakefile
More file actions
56 lines (39 loc) · 991 Bytes
/
Makefile
File metadata and controls
56 lines (39 loc) · 991 Bytes
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
.PHONY: clean
-include variables.mk
RUFF ?= poetry run ruff
PACKAGE_NAME=nitrokeyapp
PYTHON_KEYRING_BACKEND=keyring.backends.null.Keyring
ALL: init build
# setup environment
init: update-venv
update-venv:
ifeq (, $(shell which poetry))
$(error "No poetry in $(PATH)")
endif
poetry sync --without=deploy
# clean environment
semi-clean:
rm -rf **/__pycache__
rm -rf build/
rm -rf dist/
clean: semi-clean
poetry env remove --all
rm -rf .mypy_cache
# build
build:
poetry build
build-pyinstaller-onefile:
poetry run pyinstaller ci-scripts/linux/pyinstaller/nitrokey-app-onefile.spec
build-pyinstaller-onedir:
poetry run pyinstaller ci-scripts/linux/pyinstaller/nitrokey-app-onedir.spec
# code checks
check-format:
$(RUFF) format --check $(PACKAGE_NAME)/
check-style:
$(RUFF) check $(PACKAGE_NAME)/
check-typing:
poetry run mypy $(PACKAGE_NAME)/
check: check-format check-style check-typing
fix:
$(RUFF) format $(PACKAGE_NAME)/
$(RUFF) check --fix $(PACKAGE_NAME)/