Skip to content

Commit 5a19850

Browse files
committed
fix: Fix up the make upgrade targets.
There were various bugs with the upgrade commands and inconsistencies in the output. The compile command was not correct and the COMPILE_OPTS setting was not being set correctly.
1 parent e127ba9 commit 5a19850

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

backend/Makefile

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,9 @@ docs: ## generate Sphinx HTML documentation, including API docs
3535
# Define PIP_COMPILE_OPTS=-v to get more information during make upgrade.
3636
PIP_COMPILE = pip-compile $(PIP_COMPILE_OPTS)
3737

38+
compile-requirements: export CUSTOM_COMPILE_COMMAND=make upgrade
3839
compile-requirements: piptools ## compile the requirements/*.txt files with the latest packages satisfying requirements/*.in
39-
pip-compile -v ${COMPILE_OPTS} --allow-unsafe --rebuild -o requirements/pip-tools.txt requirements/pip-tools.in
40+
pip-compile -v ${PIP_COMPILE_OPTS} --allow-unsafe --rebuild -o requirements/pip-tools.txt requirements/pip-tools.in
4041
pip install -qr requirements/pip-tools.txt
4142
$(PIP_COMPILE) -o requirements/base.txt requirements/base.in
4243
$(PIP_COMPILE) -o requirements/test.txt requirements/test.in
@@ -48,9 +49,8 @@ compile-requirements: piptools ## compile the requirements/*.txt files with the
4849
sed '/^[dD]jango==/d' requirements/test.txt > requirements/test.tmp
4950
mv requirements/test.tmp requirements/test.txt
5051

51-
upgrade: ## update the requirements/*.txt files with the latest packages satisfying requirements/*.in
52-
pip install -qr requirements/pip-tools.txt
53-
$(MAKE) compile-requirements COMPILE_OPTS="--upgrade"
52+
upgrade: piptools ## update the requirements/*.txt files with the latest packages satisfying requirements/*.in
53+
$(MAKE) compile-requirements PIP_COMPILE_OPTS="--upgrade"
5454

5555
quality: ## check coding style with pycodestyle and pylint
5656
tox -e quality
@@ -59,7 +59,7 @@ pii_check: ## check for PII annotations on all Django models
5959
tox -e pii_check
6060

6161
piptools: ## install pinned version of pip-compile and pip-sync
62-
pip install -r requirements/pip-tools.txt
62+
# pip install -r requirements/pip-tools.txt
6363

6464
requirements: clean_tox piptools ## install development environment requirements
6565
pip-sync -q requirements/dev.txt requirements/private.*

0 commit comments

Comments
 (0)