forked from pavlov99/json-rpc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
53 lines (44 loc) · 1001 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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
ENV=$(CURDIR)/.env
PYTHON=$(ENV)/bin/python
PYVERSION=$(shell pyversions --default)
SITE_PACKAGES=numpy scipy
RED=\033[0;31m
GREEN=\033[0;32m
NC=\033[0m
all: $(ENV)
@echo "Virtualenv is installed"
.PHONY: help
# target: help - Display callable targets
help:
@egrep "^# target:" [Mm]akefile
.PHONY: clean
# target: clean - Display callable targets
clean:
@rm -rf build dist docs/_build
@rm -f *.py[co]
@rm -f *.orig
@rm -f *.prof
@rm -f *.lprof
@rm -f *.so
@rm -f */*.py[co]
@rm -f */*.orig
@rm -f */*/*.py[co]
.PHONY: register
# target: register - Register module on PyPi
register:
@python setup.py register
.PHONY: upload
# target: upload - Upload module on PyPi
upload:
@python setup.py sdist bdist_wheel upload || echo 'Upload already'
.PHONY: test
# target: test - Runs tests
test: clean
$(PYTHON) setup.py test
$(ENV):
virtualenv --no-site-packages .env
$(ENV)/bin/pip install -r requirements.txt
.PHONY: serve
# target: serve - server docs
serve:
python3 -mhttp.server