Skip to content

Commit 137342f

Browse files
codexByron
authored andcommitted
ci: make Cygwin ensurepip available to tests
The Cygwin fast job now reaches the test suite, but test_installation creates another pip-enabled virtual environment. That nested venv failed because Cygwin's patched ensurepip found no wheels in /usr/share/python-wheels after the workflow stopped installing the generic wheel packages. Install Cygwin's compatible setuptools wheel and put the downloaded, SHA-256-verified pip 26.0.1 wheel in ensurepip's shared wheel directory. Creating the workflow venv normally then verifies the same path used later by the installation test while retaining Python 3.9 coverage. Validation: git diff --check; Ruby YAML parsing; pip wheel SHA-256 verification; Cygwin package archive inspection.
1 parent 99c5546 commit 137342f

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

.github/workflows/cygwin-test.yml

Lines changed: 3 additions & 4 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: curl git python39
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,11 +73,10 @@ jobs:
7373
7474
- name: Set up virtual environment
7575
run: |
76-
pip_wheel=/tmp/pip-26.0.1-py3-none-any.whl
77-
python3.9 -m venv --without-pip .venv
76+
pip_wheel=/usr/share/python-wheels/pip-26.0.1-py3-none-any.whl
7877
curl -fsSLo "$pip_wheel" https://files.pythonhosted.org/packages/de/f0/c81e05b613866b76d2d1066490adf1a3dbc4ee9d9c839961c3fc8a6997af/pip-26.0.1-py3-none-any.whl
7978
python3.9 -c 'import hashlib, pathlib, sys; assert hashlib.sha256(pathlib.Path(sys.argv[1]).read_bytes()).hexdigest() == sys.argv[2]' "$pip_wheel" bdb1b08f4274833d62c1aa29e20907365a2ceb950410df15fc9521bad440122b
80-
PYTHONPATH="$pip_wheel" .venv/bin/python -m pip install "$pip_wheel"
79+
python3.9 -m venv .venv
8180
echo 'BASH_ENV=.venv/bin/activate' >>"$GITHUB_ENV"
8281
8382
- name: Update PyPA packages

0 commit comments

Comments
 (0)