-
Notifications
You must be signed in to change notification settings - Fork 29
/
Makefile
40 lines (32 loc) · 1.47 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
all: requirements quality test
.PHONY: clean requirements quality test upgrade
clean:
coverage erase
find . -name '*.pyc' -delete
quality:
tox -e quality
requirements:
pip install -qr requirements/pip.txt
pip install -e . # Install this package and its dependencies
pip install -r test-requirements.txt
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)
sed 's/django-simple-history==3.0.0//g' requirements/common_constraints.txt > requirements/common_constraints.tmp
mv requirements/common_constraints.tmp requirements/common_constraints.txt
## update the requirements text files based on the requirements/*.in files
pip install -qr requirements/pip-tools.txt
pip-compile --upgrade --allow-unsafe --rebuild -o requirements/pip.txt requirements/pip.in
pip-compile --upgrade -o requirements/pip-tools.txt requirements/pip-tools.in
pip install -qr requirements/pip.txt
pip install -qr requirements/pip-tools.txt
pip-compile --upgrade --allow-unsafe -o requirements/base.txt requirements/base.in
pip-compile --upgrade -o test-requirements.txt requirements/test.in
# Let tox control the Django version for tests
sed -i.tmp '/^django==/d' test-requirements.txt
rm test-requirements.txt.tmp
test:
tox