-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
23 lines (18 loc) · 739 Bytes
/
Makefile
File metadata and controls
23 lines (18 loc) · 739 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
PYTHON ?= python3.10
PIPTOOLS := $(PYTHON) -m piptools
.PHONY: deps lock check-lock run
deps:
$(PYTHON) -m pip install --upgrade pip setuptools wheel
$(PYTHON) -m pip install -r requirements.txt
lock:
$(PYTHON) -m pip install --upgrade pip pip-tools
$(PIPTOOLS) compile --resolver=backtracking --output-file=requirements.txt requirements.in
check-lock:
$(PYTHON) -m pip install --upgrade pip pip-tools
tmpfile=$$(mktemp); \
$(PIPTOOLS) compile --resolver=backtracking --output-file=$$tmpfile requirements.in; \
perl -0pi -e 's|pip-compile --output-file=.*? requirements\\.in|pip-compile --output-file=requirements.txt requirements.in|' $$tmpfile; \
diff -u requirements.txt $$tmpfile; \
rm $$tmpfile
run:
$(PYTHON) main.py