-
Notifications
You must be signed in to change notification settings - Fork 39
/
Makefile
47 lines (38 loc) · 2.24 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
44
45
46
47
NODE_BIN=./node_modules/.bin
help:
@echo ' '
@echo 'Makefile for the xqueue-watcher '
@echo ' '
@echo 'Usage: '
@echo ' make requirements install requirements for local development '
@echo ' make test run python unit-tests '
@echo ' make clean delete generated byte code and coverage reports '
@echo ' '
COMMON_CONSTRAINTS_TXT=requirements/common_constraints.txt
.PHONY: $(COMMON_CONSTRAINTS_TXT)
$(COMMON_CONSTRAINTS_TXT):
wget -O "$(@)" https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt || touch "$(@)"
upgrade: export CUSTOM_COMPILE_COMMAND=make upgrade
upgrade: $(COMMON_CONSTRAINTS_TXT)
## update the requirements/*.txt files with the latest packages satisfying requirements/*.in
pip install -q -r requirements/pip_tools.txt
pip-compile --allow-unsafe --rebuild --upgrade -o requirements/pip.txt requirements/pip.in
pip-compile --upgrade -o requirements/pip_tools.txt requirements/pip_tools.in
pip install -q -r requirements/pip.txt
pip install -q -r requirements/pip_tools.txt
pip-compile --upgrade -o requirements/base.txt requirements/base.in
pip-compile --upgrade -o requirements/production.txt requirements/production.in
pip-compile --upgrade -o requirements/test.txt requirements/test.in
pip-compile --upgrade -o requirements/ci.txt requirements/ci.in
requirements:
pip install -qr requirements/production.txt --exists-action w
test.requirements:
pip install -q -r requirements/test.txt --exists-action w
ci.requirements:
pip install -q -r requirements/ci.txt --exists-action w
test: test.requirements
pytest --cov=xqueue_watcher --cov-report=xml tests
clean:
find . -name '*.pyc' -delete
# Targets in a Makefile which do not produce an output file with the same name as the target name
.PHONY: help requirements clean