From 9a08c0964227a1a999fa4cb42f63a355df0804fc Mon Sep 17 00:00:00 2001 From: Brad Warren Date: Fri, 2 Mar 2018 15:52:37 -0800 Subject: [PATCH] Use per package requirements files --- tools/pip_install.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tools/pip_install.sh b/tools/pip_install.sh index d2aae4a43..7836457bf 100755 --- a/tools/pip_install.sh +++ b/tools/pip_install.sh @@ -9,11 +9,17 @@ tools_dir=$(dirname $("$(dirname $0)/readlink.py" $0)) dev_constraints="$tools_dir/dev_constraints.txt" merge_reqs="$tools_dir/merge_requirements.py" +requirements="" test_constraints=$(mktemp) trap "rm -f $test_constraints" EXIT if [ "$CERTBOT_OLDEST" = 1 ]; then + if [ "$1" != "-e" -o "$#" -ne "2" ]; then + echo "When CERTBOT_OLDEST is set, this script must be run with a single -e argument." + exit 1 + fi cp "$tools_dir/oldest_constraints.txt" "$test_constraints" + requirements="-r$2/local-oldest-requirements.txt" else repo_root=$(dirname "$tools_dir") certbot_requirements="$repo_root/letsencrypt-auto-source/pieces/dependency-requirements.txt" @@ -23,4 +29,4 @@ fi set -x # install the requested packages using the pinned requirements as constraints -pip install -q --constraint <("$merge_reqs" "$dev_constraints" "$test_constraints") "$@" +pip install -q --constraint <("$merge_reqs" "$dev_constraints" "$test_constraints") $requirements "$@"