-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathMakefile
More file actions
121 lines (98 loc) · 2.26 KB
/
Makefile
File metadata and controls
121 lines (98 loc) · 2.26 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
# TkEasyGUI task runner
SCRIPT_DIR := $(dir $(abspath $(lastword $(MAKEFILE_LIST))))
SRC=$(SCRIPT_DIR)TkEasyGUI
.PHONY: install install-dev lint format clean check doc version
install:
pip uninstall -y TkEasyGUI
pip install -e .
install-dev:
pip install -U pip setuptools wheel twine
pip install -r requirements.txt
pip install pylint black isort mypy
lint:
cd $(SCRIPT_DIR)
ruff check
pylint $(SRC)
black --check $(SRC)
mypy $(SRC)
format:
black $(SRC) tests/
format-check:
black --check $(SRC) tests/
lint-and-format:
cd $(SCRIPT_DIR)
black $(SRC) tests/
pylint $(SRC)
mypy $(SRC)
doc:
python update_version.py
python makedoc.py
python docs/scripts/readme_maker.py
@echo "ok"
build-docs:
# alias doc
make doc
version:
python update_version.py
clean:
@echo "=== clean ==="
cd $(SCRIPT_DIR)
rm -f -r dist
rm -f -r TkEasyGUI.egg-info
rm -f -r TkEasyGUI/__pycache__
rm -f -r TkEasyGUI/TkEasyGUI.egg-info
print-script-dir:
@echo $(SCRIPT_DIR)
deploy-build-only:
make clean
make build-docs
python -m build
deploy-test:
pip install build twine
make deploy-build-only
python -m twine upload --repository testpypi dist/* --verbose
@echo "[TRY] task install test"
deploy-main:
pip install build twine
make deploy-build-only
python -m twine upload dist/* --verbose
package:
@echo "=== MAKE PACKAGE ==="
# ------------------
make clean
@echo "* uninstall TkEasyGUI"
python -m pip uninstall -y TkEasyGUI
# ------------------
@echo "* build-docs"
make build-docs
# ------------------
@echo "* update_version"
python update_version.py
# ------------------
@echo "* build"
python -m build
package-test:
# ------------------
make package
python -m twine upload --repository testpypi dist/* --verbose
# ------------------
@echo "* install test pypi"
@echo "[TRY]: python -m pip install -U --index-url https://test.pypi.org/simple/ --no-deps TkEasyGUI"
package-publish:
# ------------------
make package
@echo "* publish"
python -m twine upload dist/* --verbose
# ------------------
@echo "* install pypi"
@echo "[TRY]: python -m pip install -U TkEasyGUI"
run:
cd $(SCRIPT_DIR)
python tests/file_viewer.py
check:
cd $(SCRIPT_DIR)
ruff check TkEasyGUI/*.py
mypy TkEasyGUI/*.py
test_elements:
python element2json.py
python elements_test.py