forked from elephantrobotics/pymycobot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
37 lines (30 loc) · 790 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
PY2 = python2
PY = python3
.PHONY: lint
lint:
@if [ ! -f flake8 ]; then $(PY) -m pip install flake8; fi
flake8
.PHONY: format
format:
@if [ ! `$(PY) -m pip freeze | grep black` ]; then $(PY) -m pip install black; fi
$(PY) -m black ./pymycobot ./setup.py
.PHONY: test
test:
@if [ ! -f pytest ]; then $(PY) -m pip install pytest; fi
pytest -s ./tests/test_api.py
.PHONY: clean
clean:
find . -type f -name *.pyc -delete
find . -type d -name __pycache__ -delete
.PHONY: del
del: clean
@if [ -d ./dist ]; then rm -r ./dist/; fi
@if [ -d ./build ]; then rm -r ./build; fi
@if [ -d ./pymycobot.egg-info ]; then rm -r ./pymycobot.egg-info; fi
.PHONY: install
install: del
$(PY) setup.py install
.PHONY: release
release: del
$(PY) setup.py sdist bdist_wheel
twine upload dist/*