-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
51 lines (39 loc) · 890 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
47
48
49
50
51
system_python := python3
venv := .venv
venv_python := $(venv)/bin/python3
.PHONY: all
all: deps check test
.PHONY: build
build: venv
$(venv_python) -m build
.PHONY:
check: venv
$(venv_python) -m flake8
.PHONY: clean
clean: clean-buildfiles clean-pycache clean-testfiles
.PHONY: clean-buildfiles
clean-buildfiles:
rm -fr dist
rm -fr src/pgxsq.egg-info
.PHONY: clean-pycache
clean-pycache:
find -name __pycache__ -exec rm -fr {} +
.PHONY: clean-testfiles
clean-testfiles:
rm -fr .pytest_cache
.PHONY: deps
deps: venv
$(venv_python) -m pip install --upgrade pip
$(venv_python) -m pip install -r requirements/dev.txt
$(venv_python) -m pip install --editable .
.PHONY: install
install:
pip install .
.PHONY: test
test: venv
$(venv_python) -m tox
.PHONY: venv
venv: $(venv)/.gitignore
$(venv)/.gitignore:
test -d $(venv) || $(system_python) -m venv $(venv)
echo '*' > $@