Skip to content

Commit 0e8c23c

Browse files
Byroncodex
andcommitted
ci: restore Cygwin virtual environments on Python 3.9
<!-- agent --> Cygwin patches ensurepip to load setuptools and pip wheels from `/usr/share/python-wheels`. The rolling python-pip-wheel package advanced to pip 26.2.1, which requires Python 3.10 or newer, so every Python 3.9 venv creation failed—including the installation test's nested virtual environment. Keep the single Cygwin lane on Python 3.9 because the regular matrix already covers Python 3.12 and newer. Install Cygwin's setuptools wheel, download pip 26.0.1 from its immutable PyPI URL into ensurepip's shared wheel directory, verify its SHA-256 digest, and avoid upgrading pip. This fixes all venv creation without relying on a version that may disappear from rolling Cygwin mirrors. Assisted-by: GPT 5.6 Co-authored-by: GPT 5.6 <codex@openai.com>
1 parent 180b1ff commit 0e8c23c

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

.github/workflows/cygwin-test.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ jobs:
4545
- name: Install Cygwin
4646
uses: cygwin/cygwin-install-action@v6
4747
with:
48-
packages: git python39 python-pip-wheel python-setuptools-wheel python-wheel-wheel
48+
packages: curl git python39 python-setuptools-wheel
4949
add-to-path: false # No need to change $PATH outside the Cygwin environment.
5050

5151
- name: Arrange for verbose output
@@ -73,12 +73,15 @@ jobs:
7373
7474
- name: Set up virtual environment
7575
run: |
76+
pip_wheel=/usr/share/python-wheels/pip-26.0.1-py3-none-any.whl
77+
curl -fsSLo "$pip_wheel" https://files.pythonhosted.org/packages/de/f0/c81e05b613866b76d2d1066490adf1a3dbc4ee9d9c839961c3fc8a6997af/pip-26.0.1-py3-none-any.whl
78+
python3.9 -c 'import hashlib, pathlib, sys; assert hashlib.sha256(pathlib.Path(sys.argv[1]).read_bytes()).hexdigest() == sys.argv[2]' "$pip_wheel" bdb1b08f4274833d62c1aa29e20907365a2ceb950410df15fc9521bad440122b
7679
python3.9 -m venv .venv
7780
echo 'BASH_ENV=.venv/bin/activate' >>"$GITHUB_ENV"
7881
7982
- name: Update PyPA packages
8083
run: |
81-
python -m pip install -U pip 'setuptools; python_version<"3.12"' wheel
84+
python -m pip install -U 'setuptools; python_version<"3.12"' wheel
8285
8386
- name: Install project and test dependencies
8487
run: |

0 commit comments

Comments
 (0)