-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathMakefile
46 lines (36 loc) · 898 Bytes
/
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
MODULE := stm_layout
MODULE_VERS := 0.1.4
MODULE_DEPS := \
setup.cfg \
setup.py \
stm_layout/*.py \
stm_layout/tk/*.py \
FLAKE_MODULES := stm_layout
LINT_MODULES := stm_layout
.PHONY: all
all: $(MODULE)
.PHONY: clean
clean:
rm -rf dist *.egg-info build
find . -name "*.pyc" | xargs rm
find . -name __pycache__ | xargs rm -r
.PHONY: test
test: flake8 lint
.PHONY: flake8
flake8:
python3 -m flake8 $(FLAKE_MODULES)
.PHONY: lint
lint:
pylint $(LINT_MODULES)
.PHONY: $(MODULE)
$(MODULE): dist/$(MODULE)-$(MODULE_VERS)-py3-none-any.whl
.PHONY: install
install: $(MODULE)
sudo pip3 uninstall -y $(MODULE)
sudo pip3 install dist/$(MODULE)-$(MODULE_VERS)-py3-none-any.whl
.PHONY: uninstall
uninstall:
sudo pip3 uninstall $(MODULE)
dist/$(MODULE)-$(MODULE_VERS)-py3-none-any.whl: $(MODULE_DEPS) Makefile
python3 setup.py --quiet sdist bdist_wheel
python3 -m twine check $@