From ebacfd90c8ea9b47d12b6cdf747ff9283f00ac29 Mon Sep 17 00:00:00 2001 From: Eliah Kagan Date: Sat, 23 Dec 2023 06:17:09 -0500 Subject: [PATCH] Make setuptools check on CI more precise This checks for setuptools as a full word at the very beginning of a line of output from "pip freeze --all", to: - Avoid the unlikely but possible case that setuptools is absent while something besides setuptools has "setuptools" in its line. - Prevent "setuptools" from being passed to install multiple times. This causes no problems -- it's still only installed/upgraded at most once -- but it was making the GitHub Actions log confusing on Cygwin. (It could happen on other platforms, but hasn't been.) --- .github/workflows/cygwin-test.yml | 2 +- .github/workflows/pythonpackage.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/cygwin-test.yml b/.github/workflows/cygwin-test.yml index 36378116d..7c669c1e0 100644 --- a/.github/workflows/cygwin-test.yml +++ b/.github/workflows/cygwin-test.yml @@ -63,7 +63,7 @@ jobs: - name: Update PyPA packages run: | # Get the latest pip, wheel, and prior to Python 3.12, setuptools. - python -m pip install -U pip $(pip freeze --all | grep -oF setuptools) wheel + python -m pip install -U pip $(pip freeze --all | grep -ow ^setuptools) wheel - name: Install project and test dependencies run: | diff --git a/.github/workflows/pythonpackage.yml b/.github/workflows/pythonpackage.yml index e9a7486be..08ff4efdf 100644 --- a/.github/workflows/pythonpackage.yml +++ b/.github/workflows/pythonpackage.yml @@ -56,7 +56,7 @@ jobs: - name: Update PyPA packages run: | # Get the latest pip, wheel, and prior to Python 3.12, setuptools. - python -m pip install -U pip $(pip freeze --all | grep -oF setuptools) wheel + python -m pip install -U pip $(pip freeze --all | grep -ow ^setuptools) wheel - name: Install project and test dependencies run: |