-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
43 lines (35 loc) · 1.19 KB
/
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
VENV_DIR := .venv
sync-venv: requirements-dev.txt
python3 -m venv ${VENV_DIR}
./${VENV_DIR}/bin/pip install --upgrade pip
./${VENV_DIR}/bin/pip install -r requirements-dev.txt
@echo "---"
@echo "NOTE: Please run 'source ./${VENV_DIR}/bin/activate' to use the env"
@echo " or run 'Python: Select Interpreter' from VSCode command palette"
pin-requirements: requirements.txt requirements-dev.txt
@echo "---------------------------------------------"
@echo "Done.\n"
@echo "Remember to commit changes to pyproject.toml,"
@echo " requirements.txt, and requirements-dev.txt"
@echo "---------------------------------------------"
requirements.txt: pyproject.toml
pip-compile \
--generate-hashes \
--strip-extras \
--output-file=requirements.txt \
pyproject.toml
requirements-dev.txt: requirements.txt
pip-compile \
--strip-extras \
--constraint requirements.txt \
--output-file=requirements-dev.txt \
--extra dev \
pyproject.toml
# This is basically 'python3 -m build'
build:
pyproject-build
lint:
ruff check --output-format=full --statistics --exit-zero
test:
pytest --cov=audiobook_split_ffmpeg tests/
.PHONY: sync-venv pin-requirements build lint test