From b9365e6644077b989ba7d9c847a372188bdafcab Mon Sep 17 00:00:00 2001 From: Matthias Diener Date: Thu, 9 Feb 2023 14:00:39 -0600 Subject: [PATCH] pull-packages: pip fix, add to CI (#163) --- .github/workflows/tests.yaml | 3 +++ pull-packages.sh | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 765aaa3..df4841a 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -41,6 +41,9 @@ jobs: # Don't build pyopencl as that is difficult cat myreq.txt | sed /pyopencl/d > req.txt pip install -r req.txt + - name: Run update + run: | + ./pull-packages.sh -x - name: Reinstall emirge env with new requirements.txt run: | ./install.sh --env-name=reinstall_env --pip-pkgs=req.txt diff --git a/pull-packages.sh b/pull-packages.sh index 2996d86..716f672 100755 --- a/pull-packages.sh +++ b/pull-packages.sh @@ -1,6 +1,6 @@ #!/bin/bash -set -o nounset -o errexit +set -o nounset -o errexit -o pipefail SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" @@ -69,7 +69,7 @@ echo "==== Updating pip packages." conda_pypi=$(conda list | awk '/pypi/ {print $1}') # Names of outdated packages according to pip -pip_outdated=$(pip list --local --outdated | tail +3 | awk '{print $1}') +pip_outdated=$(pip list --local --outdated | tail -n +3 | awk '{print $1}') # For each outdated package, make sure it was actually installed by pip # before updating it.