-
Notifications
You must be signed in to change notification settings - Fork 25
/
Copy pathMakefile
76 lines (59 loc) · 1.17 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
64
65
66
67
68
69
70
71
72
73
74
75
76
# Makefile to help automate tasks
WD := $(shell pwd)
PY := bin/python
PIP := bin/pip
PEP8 := bin/pep8
PYTEST := bin/py.test
# ###########
# Tests rule!
# ###########
.PHONY: test
test: venv develop $(PYTEST)
$(PYTEST) -q --tb native -s tests
.PHONY: test-coverage
test-coverage: venv develop $(PYTEST)
$(PYTEST) -q --cov breadability tests
$(PYTEST):
$(PIP) install -r requirements.txt
# #######
# INSTALL
# #######
.PHONY: all
all: venv deps develop
venv: bin/python
bin/python:
virtualenv .
.PHONY: deps
deps: venv
$(PIP) install -r requirements.txt
.PHONY: clean_venv
clean_venv:
rm -rf bin include lib local man share
.PHONY: develop
develop: lib/python*/site-packages/breadability.egg-link
lib/python*/site-packages/breadability.egg-link:
$(PY) setup.py develop
# ###########
# Development
# ###########
.PHONY: clean-all
clean-all: clean_venv
if [ -d dist ]; then \
rm -r dist; \
fi
bin/flake8: venv
bin/pip install flake8
lint: bin/flake8
flake8 breadability
# ###########
# Deploy
# ###########
.PHONY: dist
dist:
$(PY) setup.py sdist
.PHONY: upload
upload:
$(PY) setup.py sdist upload
.PHONY: version_update
version_update:
$(EDITOR) setup.py CHANGELOG.rst