-
Notifications
You must be signed in to change notification settings - Fork 19
/
Makefile
53 lines (37 loc) · 1.09 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
48
49
50
51
52
53
VENV_BIN = python3 -m venv
VENV_DIR ?= .venv
VENV_ACTIVATE = . $(VENV_DIR)/bin/activate
all :
@echo "select a build target"
ROOT_DIR = faassim
venv: $(VENV_DIR)/bin/activate
$(VENV_DIR)/bin/activate: requirements.txt requirements-dev.txt
test -d .venv || $(VENV_BIN) .venv
$(VENV_ACTIVATE); pip install -Ur requirements.txt
$(VENV_ACTIVATE); pip install -Ur requirements-dev.txt
touch $(VENV_DIR)/bin/activate
clean:
rm -rf build/
rm -rf .eggs/
find -iname "*.pyc" -delete
rm -rf __pycache__
find tests -type d -name "__pycache__" -delete
find $(ROOT_DIR) -type d -name "__pycache__" -delete
clean-venv:
rm -rf $(VENV_DIR)
clean-dist: clean
rm -rf dist/
rm -rf *.egg-info/
build: venv
$(VENV_ACTIVATE); python setup.py build
test: venv
$(VENV_ACTIVATE); python setup.py test
pytest: venv
$(VENV_ACTIVATE); pytest --cov $(ROOT_DIR)
dist: venv
$(VENV_ACTIVATE); python setup.py sdist bdist_wheel
install: venv
$(VENV_ACTIVATE); python setup.py install
deploy: venv test dist
$(VENV_ACTIVATE); pip install --upgrade twine; twine upload dist/*
.PHONY: clean clean-dist clean-venv