forked from prawn-cake/vk-requests
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
53 lines (39 loc) · 1.16 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
# System variables
VIRTUAL_ENV=$(CURDIR)/.env
PYTHON=$(VIRTUAL_ENV)/bin/python
COVERAGE=$(VIRTUAL_ENV)/bin/coverage
NOSE=$(VIRTUAL_ENV)/bin/nosetests
help:
# target: help - Display callable targets
@grep -e "^# target:" [Mm]akefile | sed -e 's/^# target: //g'
.PHONY: clean
# target: clean - Display callable targets
clean:
rm -rf build/ dist/ docs/_build *.egg-info \.coverage MANIFEST
find $(CURDIR) -name "*.py[co]" -delete
find $(CURDIR) -name "*.orig" -delete
find $(CURDIR)/$(MODULE) -name "__pycache__" | xargs rm -rf
.PHONY: env
env:
# target: env - create virtualenv and install packages
@virtualenv --python=python3 $(VIRTUAL_ENV)
@$(VIRTUAL_ENV)/bin/pip install -r $(CURDIR)/requirements-test.txt
# ===============
# Test commands
# ===============
.PHONY: test
test: env
# target: test - Run tests
@$(NOSE) --with-coverage .
# ===============
# Build package
# ===============
.PHONY: register
# target: register - Register package on PyPi
register:
@$(VIRTUAL_ENV)/bin/python setup.py register
.PHONY: upload
upload: clean
# target: upload - Upload package on PyPi
@$(VIRTUAL_ENV)/bin/pip install wheel
@$(PYTHON) setup.py bdist_wheel upload -r pypi