-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
37 lines (23 loc) · 788 Bytes
/
Makefile
File metadata and controls
37 lines (23 loc) · 788 Bytes
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
SHELL := /bin/bash
PY_MODULE := cli_template
PY_SCRIPT := .venv/bin/cli-template # from 'console_scripts' in setup.cfg
PY_FILES := $(shell find $(PY_MODULE) -type f -name '*.py')
.PHONY: default
default: test $(PY_SCRIPT)
.PHONY: all
all: update default
$(PY_SCRIPT): .venv requirements.txt pyproject.toml setup.cfg setup.py $(PY_FILES)
.venv/bin/pip3 install .
.venv: /usr/bin/python3
/usr/bin/python3 -m venv --clear .venv
@make update
.PHONY: test
test: .venv
.venv/bin/tox -e pep8
.PHONY: update
update: .venv requirements.txt test-requirements.txt
.venv/bin/pip3 install --upgrade --upgrade-strategy eager -r requirements.txt
.venv/bin/pip3 install --upgrade --upgrade-strategy eager -r test-requirements.txt
.PHONY: clean
clean:
rm -rf .tox .venv *.egg-info