From e565f514c3a2ff94dd8c2e71c8c8dfe0552ca732 Mon Sep 17 00:00:00 2001 From: Orfeas Kourkakis Date: Fri, 29 Sep 2023 11:56:09 +0300 Subject: [PATCH] update tox.ini's update-requirements --- tox.ini | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tox.ini b/tox.ini index 3e76c61..1e43a8c 100644 --- a/tox.ini +++ b/tox.ini @@ -32,10 +32,10 @@ allowlist_externals = pip-compile xargs commands = -; uses 'bash -c' because piping didn't work in regular tox commands - pip-compile requirements.in - pip-compile requirements-fmt.in - bash -c 'find . -type f -name "requirements*.in" | xargs --replace=\{\} pip-compile -U --resolver=backtracking \{\}' + ; we must preserve the order of compilation, since each *.in file depends on some *.txt file. + ; For example, requirements-unit.in depends on requirements.txt and we must compile first + ; requirements.txt to ensure that requirements-unit.txt get the same dependency as the requirements.txt + bash -c 'for pattern in "requirements.in" "requirements-fmt.in" "requirements*.in"; do find . -type f -name "$pattern" -exec bash -c "cd \$(dirname "{}") && pip-compile --resolver=backtracking \$(basename "{}")" \;; done' deps = pip-tools description = Update requirements files by executing pip-compile on all requirements*.in files, including those in subdirs.