forked from Kinto/kinto-http.py
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
59 lines (45 loc) · 1.74 KB
/
Copy pathMakefile
File metadata and controls
59 lines (45 loc) · 1.74 KB
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
VIRTUALENV = virtualenv --python=python3.6
VENV := $(shell echo $${VIRTUAL_ENV-.venv})
PYTHON = $(VENV)/bin/python
DEV_STAMP = $(VENV)/.dev_env_installed.stamp
INSTALL_STAMP = $(VENV)/.install.stamp
TEMPDIR := $(shell mktemp -d)
.IGNORE: clean distclean maintainer-clean
.PHONY: all install virtualenv tests tests-once
OBJECTS = .venv .coverage
all: install
install: $(INSTALL_STAMP)
$(INSTALL_STAMP): $(PYTHON) setup.py
$(VENV)/bin/pip install -U pip
$(VENV)/bin/pip install -Ue .
touch $(INSTALL_STAMP)
install-dev: $(INSTALL_STAMP) $(DEV_STAMP)
$(DEV_STAMP): $(PYTHON) dev-requirements.txt
$(VENV)/bin/pip install -r dev-requirements.txt
touch $(DEV_STAMP)
virtualenv: $(PYTHON)
$(PYTHON):
$(VIRTUALENV) $(VENV)
need-kinto-running:
@curl http://localhost:8888/v0/ 2>/dev/null 1>&2 || (echo "Run 'make runkinto' before starting tests." && exit 1)
runkinto: install-dev
$(VENV)/bin/kinto migrate --ini kinto_http/tests/config/kinto.ini
$(VENV)/bin/kinto start --ini kinto_http/tests/config/kinto.ini
tests-once: install-dev need-kinto-running
$(VENV)/bin/py.test kinto_http/tests/functional.py kinto_http/tests --cov-report term-missing --cov-fail-under 100 --cov kinto_http
functional: install-dev need-kinto-running
$(VENV)/bin/py.test kinto_http/tests/functional.py
tests: install-dev need-kinto-running
$(VENV)/bin/py.test -f kinto_http/tests/ kinto_http/tests/functional.py
clean:
find . -name '*.pyc' -delete
find . -name '__pycache__' -type d | xargs rm -fr
distclean: clean
rm -fr *.egg *.egg-info/ dist/ build/
maintainer-clean: distclean
rm -fr .venv/ .tox/
build-requirements:
$(VIRTUALENV) $(TEMPDIR)
$(TEMPDIR)/bin/pip install -U pip
$(TEMPDIR)/bin/pip install -Ue .
$(TEMPDIR)/bin/pip freeze | grep -v -- '-e' > requirements.txt