-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
43 lines (34 loc) · 951 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
38
39
40
41
42
43
PY_DIRS=s3sign
VE ?= ./ve
REQUIREMENTS ?= test_reqs.txt
SYS_PYTHON ?= python3
PY_SENTINAL ?= $(VE)/sentinal
WHEEL_VERSION ?= 0.43.0
PIP_VERSION ?= 24.1.2
MAX_COMPLEXITY ?= 8
PY_DIRS ?= $(APP)
DJANGO ?= "Django==4.2.13"
FLAKE8 ?= $(VE)/bin/flake8
PIP ?= $(VE)/bin/pip
COVERAGE ?=$(VE)/bin/coverage
all: flake8 coverage
clean:
rm -rf $(VE)
find . -name '*.pyc' -exec rm {} \;
rm -rf node_modules
$(PY_SENTINAL):
rm -rf $(VE)
$(SYS_PYTHON) -m venv $(VE)
$(PIP) install pip==$(PIP_VERSION)
$(PIP) install --upgrade setuptools
$(PIP) install wheel==$(WHEEL_VERSION)
$(PIP) install --no-deps --requirement $(REQUIREMENTS) --no-binary cryptography
$(PIP) install "$(DJANGO)"
touch $@
test: $(REQUIREMENTS) $(PY_SENTINAL)
./ve/bin/python runtests.py
flake8: $(PY_SENTINAL)
$(FLAKE8) $(PY_DIRS) --max-complexity=$(MAX_COMPLEXITY)
coverage: $(PY_SENTINAL)
$(COVERAGE) run --source=s3sign runtests.py
.PHONY: flake8 test jshint jscs clean