forked from horejsek/python-fastjsonschema
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
47 lines (34 loc) · 1.22 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
.PHONY: all venv test lint lint-js lint-web test test-web watch compile run makemessages compilemessages clean-dev deb
SHELL=/bin/bash
VENV_NAME?=venv
VENV_BIN=$(shell pwd)/${VENV_NAME}/bin
PYTHON=${VENV_BIN}/python3
all:
@echo "make test - Run tests during development"
@echo "make performance - Run performance test of this and other implementation"
@echo "make doc - Make documentation"
@echo "make clean - Get rid of scratch and byte files"
venv: $(VENV_NAME)/bin/activate
$(VENV_NAME)/bin/activate: setup.py
test -d $(VENV_NAME) || virtualenv -p python3 $(VENV_NAME)
# Some problem in latest version of setuptools during extracting translations.
${PYTHON} -m pip install -U pip setuptools==39.1.0
${PYTHON} -m pip install -e .[devel]
touch $(VENV_NAME)/bin/activate
test: venv
${PYTHON} -m pytest
test-lf: venv
${PYTHON} -m pytest --last-failed tests
lint: venv
${PYTHON} -m pylint fastjsonschema
performance: venv
${PYTHON} performance.py
doc:
cd docs; make
upload: venv
${PYTHON} setup.py register sdist upload
deb: venv
${PYTHON} setup.py --command-packages=stdeb.command bdist_deb
clean:
find . -name '*.pyc' -exec rm --force {} +
rm -rf $(VENV_NAME) *.eggs *.egg-info dist build docs/_build .mypy_cache .cache