-
Notifications
You must be signed in to change notification settings - Fork 18
/
Makefile
63 lines (56 loc) · 1.87 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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
.PHONY: setup
setup:
python3 -m venv .env
.env/bin/pip install --upgrade pip
.env/bin/pip install --upgrade --requirement requirements.txt
.env/bin/pip install --upgrade --requirement requirements-dev.txt
.env/bin/pip install --upgrade --requirement requirements-examples.txt
.PHONY: install
install: setup
.env/bin/pip install .
.PHONY: lint
lint:
.env/bin/pylint \
setup.py staticmaps examples tests
.env/bin/flake8 \
setup.py staticmaps examples tests
.env/bin/mypy \
setup.py staticmaps examples tests
.env/bin/black \
--line-length 120 \
--check \
--diff \
setup.py staticmaps examples tests
.PHONY: format
format:
.env/bin/black \
--line-length 120 \
setup.py staticmaps examples tests
.PHONY: run-examples
run-examples:
(cd examples && PYTHONPATH=.. ../.env/bin/python custom_objects.py)
(cd examples && PYTHONPATH=.. ../.env/bin/python draw_gpx.py running.gpx)
(cd examples && PYTHONPATH=.. ../.env/bin/python frankfurt_newyork.py)
(cd examples && PYTHONPATH=.. ../.env/bin/python freiburg_area.py)
(cd examples && PYTHONPATH=.. ../.env/bin/python geodesic_circles.py)
(cd examples && PYTHONPATH=.. ../.env/bin/python tile_providers.py)
(cd examples && PYTHONPATH=.. ../.env/bin/python us_capitals.py)
(cd examples && PYTHONPATH=.. ../.env/bin/python idl.py)
(cd examples && mv *.svg build/.)
(cd examples && mv *pillow*png build/.)
(cd examples && mv *cairo*png build/.)
(cd -)
.PHONY: test
test:
PYTHONPATH=. .env/bin/python -m pytest tests
.PHONY: build-package
build-package:
rm -rf dist
PYTHONPATH=. .env/bin/python setup.py sdist
PYTHONPATH=. .env/bin/twine check dist/*
.PHONY: upload-package-test
upload-package-test:
PYTHONPATH=. .env/bin/twine upload --repository-url https://test.pypi.org/legacy/ dist/*
.PHONY: upload-package
upload-package:
PYTHONPATH=. .env/bin/twine upload --repository py-staticmaps dist/*