-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathMakefile
37 lines (31 loc) · 906 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
PYTHON3 ?= python3
all: dist
all: dist
.PHONY: dist
dist: venv/manifest.txt
./venv/bin/poetry build
.PHONY: lint
lint: venv/manifest.txt
./venv/bin/black --check .
./venv/bin/flake8 .
./venv/bin/mypy --check-untyped-defs .
venv: venv/manifest.txt
venv/manifest.txt: ./pyproject.toml
rm -rf venv
python3 -m venv ./venv
PYTHONPATH= ./venv/bin/python3 -m pip install --upgrade pip
PYTHONPATH= ./venv/bin/python3 -m pip install --upgrade wheel poetry poetry-plugin-export
PYTHONPATH= ./venv/bin/poetry export --with dev --without-hashes --format=requirements.txt --output=requirements_tmp.txt
PYTHONPATH= ./venv/bin/python3 -m pip install --upgrade -r requirements_tmp.txt
PYTHONPATH= ./venv/bin/python3 -m pip freeze > $@
@echo ">> Venv prepared."
.PHONY: veryclean
veryclean: clean
veryclean:
rm -rf venv/
.PHONY: clean
clean:
rm -rf build/
rm -rf logs/
rm -rf dist/
rm -rf *.egg-info