-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmakefile
46 lines (34 loc) · 882 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
37
38
39
40
41
42
43
44
45
46
VENV=.venv
SHELL=/bin/bash
python=$(VENV)/bin/python3
pip=$(python) -m pip
# Utility scripts to prettify echo outputs
bold := '\033[1m'
sgr0 := '\033[0m'
.PHONY: bootstrap
bootstrap: venv develop
.PHONY: clean
clean:
@echo -e $(bold)Clean up old virtualenv and cache$(sgr0)
rm -rf $(VENV) *.egg-info
.PHONY: venv
venv: clean
@echo -e $(bold)Create virtualenv$(sgr0)
@python3 -m venv $(VENV)
@$(pip) install --upgrade pip pip-tools
.PHONY: develop
develop:
@echo -e $(bold)Install and update requirements$(sgr0)
$(pip) install -r requirements.txt
$(pip) install --editable .[develop]
$(pip) install --editable .[testing]
$(pip) install --editable .
.PHONY: requirements
requirements:
@$(python) -m piptools compile --upgrade \
--resolver backtracking \
--output-file requirements.txt \
pyproject.toml
.PHONY: tests
tests:
@$(python) -m pytest