-
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Makefile
36 lines (27 loc) · 913 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
.PHONY: all venv lint test doc upload clean
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)
${PYTHON} -m pip install -U pip setuptools
${PYTHON} -m pip install -e .[devel]
touch $(VENV_NAME)/bin/activate
lint: venv
${PYTHON} -m pylint sqlpuzzle tests
test: venv
${PYTHON} -m pytest
doc:
cd docs; make
upload: venv
${PYTHON} setup.py register sdist upload
clean:
find . -name '*.pyc' -exec rm --force {} +
rm -rf $(VENV_NAME) *.eggs *.egg-info dist build docs/_build .mypy_cache .cache