-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
52 lines (42 loc) · 1.14 KB
/
Makefile
File metadata and controls
52 lines (42 loc) · 1.14 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
GLOTLIB_VERS := 1.0.3
MODULES := \
setup.cfg \
setup.py \
glotlib/shaders/*.py \
glotlib/shaders/*.frag \
glotlib/shaders/*.vert \
glotlib/font_files/*.py \
glotlib/font_files/ttf_bitstream_vera_1_10/* \
glotlib/*.py
PYTHON := python3
.PHONY: all
all: glotlib
.PHONY: clean
clean:
rm -rf dist *.egg-info build
find . -name "*.pyc" | xargs rm 2>/dev/null || true
find . -name __pycache__ | xargs rm -r 2>/dev/null || true
.PHONY: test
test: flake8 lint
.PHONY: flake8
flake8:
$(PYTHON) -m flake8 glotlib tests
.PHONY: lint
lint:
$(PYTHON) -m pylint -j2 glotlib tests
.PHONY: glotlib
glotlib: dist/glotlib-$(GLOTLIB_VERS)-py3-none-any.whl
.PHONY: install
install: glotlib | uninstall
sudo $(PYTHON) -m pip install dist/glotlib-$(GLOTLIB_VERS)-py3-none-any.whl --break-system-packages
.PHONY: uninstall
uninstall:
sudo $(PYTHON) -m pip uninstall -y glotlib --break-system-packages
.PHONY: publish
publish: glotlib
$(PYTHON) -m twine upload \
dist/glotlib-$(GLOTLIB_VERS)-py3-none-any.whl \
dist/glotlib-$(GLOTLIB_VERS).tar.gz
dist/glotlib-$(GLOTLIB_VERS)-py3-none-any.whl: $(MODULES) Makefile
$(PYTHON) -m build
$(PYTHON) -m twine check $@