aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKrzysztof Konopko <kkonopko@users.noreply.github.com>2020-06-15 19:28:46 +0200
committerGitHub <noreply@github.com>2020-06-15 13:28:46 -0400
commit4a3a682b12f93a03888e8b59f439bc5fe30d6055 (patch)
treec091268b8bb6e38d34f0d001bcb21101d933904a /Lib/ensurepip
parentbpo-1635741: Port _dbm module to multiphase initialization (GH-20848) (diff)
downloadcpython-4a3a682b12f93a03888e8b59f439bc5fe30d6055.tar.gz
cpython-4a3a682b12f93a03888e8b59f439bc5fe30d6055.tar.bz2
cpython-4a3a682b12f93a03888e8b59f439bc5fe30d6055.zip
bpo-40448: ensurepip: Do not use cache (GH-19812)
ensurepip optionally installs or upgrades 'pip' and 'setuptools' using the version of those modules bundled with Python. The internal PIP installation routine by default temporarily uses its cache, if it exists. This is undesirable as Python builds and installations may be independent of the user running the build, whilst PIP cache location is dependent on the user's environment and outside of the build environment. At the same time, there's no value in using the cache while installing bundled modules. This change disables PIP caching when used in ensurepip.
Diffstat (limited to 'Lib/ensurepip')
-rw-r--r--Lib/ensurepip/__init__.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/ensurepip/__init__.py b/Lib/ensurepip/__init__.py
index 545fce656fd..d62b1187f90 100644
--- a/Lib/ensurepip/__init__.py
+++ b/Lib/ensurepip/__init__.py
@@ -119,7 +119,7 @@ def _bootstrap(*, root=None, upgrade=False, user=False,
additional_paths.append(os.path.join(tmpdir, wheel_name))
# Construct the arguments to be passed to the pip command
- args = ["install", "--no-index", "--find-links", tmpdir]
+ args = ["install", "--no-cache-dir", "--no-index", "--find-links", tmpdir]
if root:
args += ["--root", root]
if upgrade: