Skip to content

Commit c62445d

Browse files
committed
python-setup: rely on new virtualenv for venv creation in Ubuntu 22.04
Removes the hotfix from #1257
1 parent 9dac9f7 commit c62445d

File tree

2 files changed

+11
-12
lines changed

2 files changed

+11
-12
lines changed

python-setup/install_tools.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
# version of `setuptools` to ensure that binaries are always put under
55
# `<venv-path>/bin`, which wouldn't always happen with the GitHub actions version of
66
# Ubuntu 22.04. See https://github.com/github/codeql-action/issues/1249
7-
py -2 -m pip install --user --upgrade pip 'setuptools<60' wheel
8-
py -3 -m pip install --user --upgrade pip 'setuptools<60' wheel
7+
py -2 -m pip install --user --upgrade pip setuptools wheel
8+
py -3 -m pip install --user --upgrade pip setuptools wheel
99

1010
# virtualenv is a bit nicer for setting up virtual environment, since it will provide up-to-date versions of
1111
# pip/setuptools/wheel which basic `python3 -m venv venv` won't

python-setup/install_tools.sh

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,15 @@ export PATH="$HOME/.local/bin:$PATH"
1212

1313
# Setup Python 3 dependency installation tools.
1414

15-
# we install an older version of `setuptools` to ensure that binaries are always put
16-
# under `<venv-path>/bin`, which wouldn't always happen with the GitHub actions version
17-
# of Ubuntu 22.04. See https://github.com/github/codeql-action/issues/1249. The the next
18-
# release of `virtualenv` after v20.16.5 will include a fix for this, so we can remove
19-
# this bit of the logic again.
20-
python3 -m pip install --user --upgrade pip 'setuptools<60' wheel
15+
python3 -m pip install --user --upgrade pip setuptools wheel
2116

22-
# virtualenv is a bit nicer for setting up virtual environment, since it will provide up-to-date versions of
23-
# pip/setuptools/wheel which basic `python3 -m venv venv` won't
24-
python3 -m pip install --user virtualenv
17+
# virtualenv is a bit nicer for setting up virtual environment, since it will provide
18+
# up-to-date versions of pip/setuptools/wheel which basic `python3 -m venv venv` won't.
19+
#
20+
# version 20.16.5 (Python 3 only) had some problems when used together with newer
21+
# versions of setuptools (60+) and would not always put binaries under `<venv-path>/bin`
22+
# -- see https://github.com/github/codeql-action/issues/1249 for more details.
23+
python3 -m pip install --user --upgrade 'virtualenv>20.16.5'
2524

2625
# We install poetry with pip instead of the recommended way, since the recommended way
2726
# caused some problem since `poetry run` gives output like:
@@ -45,7 +44,7 @@ if command -v python2 >/dev/null 2>&1; then
4544
curl --location --fail https://bootstrap.pypa.io/pip/2.7/get-pip.py | python2
4645
fi
4746

48-
python2 -m pip install --user --upgrade pip 'setuptools<60' wheel
47+
python2 -m pip install --user --upgrade pip setuptools wheel
4948

5049
python2 -m pip install --user 'virtualenv!=20.12.0'
5150
fi

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy