-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
48 lines (39 loc) · 1.09 KB
/
Makefile
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
PACKAGE_NAME = secondglass
PROJECT_DIR = secondglass
CODE = ${PROJECT_DIR} tests
# https://stackoverflow.com/a/4511164/2493536
ifdef OS # Windows
PATH_ARG_SEP=;
else
ifeq ($(shell uname), Linux) # Linux
PATH_ARG_SEP=:
endif
endif
run:
poetry run python -m ${PROJECT_DIR}
init:
poetry install
export_requirements:
poetry export --without-hashes --with dev -f requirements.txt --output requirements.txt
lint:
poetry run isort ${CODE}
poetry run black ${CODE}
poetry run flake8 ${CODE} --count --show-source --statistics
poetry run mypy ${CODE}
test:
poetry run pytest -vsx -m "not slow"
test-all:
poetry run pytest -vsx
.PHONY: build
build: lint test
poetry run pyinstaller \
--workpath ./build/.pyinstaller/build \
--distpath ./build \
--specpath ./build/.pyinstaller \
--noconsole \
--onefile \
--name $(PACKAGE_NAME) \
--icon ../../resources/icons/clock.ico \
--add-data ../../resources/$(PATH_ARG_SEP)./resources \
--add-data ../../$(PACKAGE_NAME)/progress/TaskbarLib.tlb$(PATH_ARG_SEP)./$(PACKAGE_NAME)/progress \
$(PACKAGE_NAME)/__main__.py