forked from cenobites/flask-jsonrpc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
35 lines (28 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
.PHONY: all clean test test-deps env env2
VIRTUALENV_EXISTS := $(shell [ -d .venv ] && echo 1 || echo 0)
VIRTUALENV2_EXISTS := $(shell [ -d .venv2 ] && echo 1 || echo 0)
all: clean test
@python setup.py build
clean:
@python setup.py clean
@find . -name "*.pyc" | xargs rm -rf
@find . -name "__pycache__" | xargs rm -rf
@rm -rf .coverage Flask_JSONRPC.egg-info/ htmlcov/ build/
test: clean test-deps
@python setup.py test
test-deps:
@pip install -r requirements_test.pip
env:
ifeq ($(VIRTUALENV_EXISTS), 0)
@virtualenv --distribute --unzip-setuptools --no-site-packages .venv
@.venv/bin/pip install --upgrade pip --quiet
@.venv/bin/pip install --upgrade setuptools --quiet
@.venv/bin/pip install -r requirements.pip
endif
env2:
ifeq ($(VIRTUALENV2_EXISTS), 0)
@virtualenv2 --distribute --unzip-setuptools --no-site-packages .venv2
@.venv2/bin/pip install --upgrade pip --quiet
@.venv2/bin/pip install --upgrade setuptools --quiet
@.venv2/bin/pip install -r requirements.pip
endif