-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathMakefile
41 lines (30 loc) · 1.08 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
VENV := $(shell echo $${VIRTUAL_ENV-$$PWD/.venv})
INSTALL_STAMP = $(VENV)/.install.stamp
.IGNORE: clean
.PHONY: all install virtualenv tests tests-once
OBJECTS = .venv .coverage
all: install
$(VENV)/bin/python:
python -m venv $(VENV)
install: $(INSTALL_STAMP) pyproject.toml requirements.txt
$(INSTALL_STAMP): $(VENV)/bin/python pyproject.toml requirements.txt
$(VENV)/bin/pip install -r requirements.txt
$(VENV)/bin/pip install -e ".[dev,s3,gcloud,docs]"
touch $(INSTALL_STAMP)
lint: install
$(VENV)/bin/ruff check pyramid_storage tests
$(VENV)/bin/ruff format --check pyramid_storage tests
format: install
$(VENV)/bin/ruff check --fix pyramid_storage tests
$(VENV)/bin/ruff format pyramid_storage tests
requirements.txt: requirements.in
pip-compile requirements.in
tests: test
test: install
$(VENV)/bin/py.test
docs: install
cd docs/ && make html SPHINXBUILD=$(VENV)/bin/sphinx-build
clean:
find pyramid_storage/ -name '*.pyc' -delete
find pyramid_storage/ -name '__pycache__' -type d -exec rm -fr {} \;
rm -rf $(VENV) mail/ *.egg-info .pytest_cache .ruff_cache .coverage build dist