Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit399eb7d

Browse files
committed
Bootstrappip in Cygwin Python 3.12 venv in a separate step
This works around a problem in Python 3.12 on Cygwin where `pip`fails to intall in a venv via `ensurepip` (both implicitly when thevenv is created normally, and explicitly when `python -m ensurepip`is attempted), by creating the venv with `--without-pip` and then,once the venv is set up, bootstrapping `pip` in it by running thehttps://bootstrap.pypa.io/get-pip.py script.Eventually, when `pip` is working automatically in a venv inPython 3.12 on Cygwin (the problem is specific to that combination,and the Cygwin `python312*` packages are still marked "test"), thisspecial-casing can be removed.
1 parent93f29c2 commit399eb7d

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

‎.github/workflows/cygwin-test.yml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ jobs:
1212
include:
1313
-python-version:"3.9"
1414
python-cygwin:python39
15-
python-command:python3.9
15+
venv-args:''
1616
-python-version:"3.12"
1717
python-cygwin:python312
18-
python-command:python3.12
18+
venv-args:--without-pip
1919

2020
fail-fast:false
2121

@@ -40,7 +40,7 @@ jobs:
4040
-name:Set up Cygwin
4141
uses:egor-tensin/setup-cygwin@v4
4242
with:
43-
packages:${{ matrix.python-cygwin }} ${{ matrix.python-cygwin }}-pip ${{ matrix.python-cygwin }}-virtualenv git
43+
packages:${{ matrix.python-cygwin }} ${{ matrix.python-cygwin }}-pip ${{ matrix.python-cygwin }}-virtualenv git wget
4444

4545
-name:Arrange for verbose output
4646
run:|
@@ -67,9 +67,14 @@ jobs:
6767
6868
-name:Set up virtualenv
6969
run:|
70-
${{ matrix.python-command }} -m venv .venv
70+
python${{ matrix.python-version }} -m venv ${{ matrix.venv-args }} .venv
7171
echo 'BASH_ENV=.venv/bin/activate' >>"$GITHUB_ENV"
7272
73+
-name:Bootstrap pip in virtualenv
74+
if:contains(matrix.venv-args, '--without-pip')
75+
run:|
76+
wget -qO- https://bootstrap.pypa.io/get-pip.py | python
77+
7378
-name:Update PyPA packages
7479
run:|
7580
# Get the latest pip, wheel, and prior to Python 3.12, setuptools.

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp