summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2020-02-01 07:35:03 +0100
committerMichał Górny <mgorny@gentoo.org>2020-02-01 09:33:19 +0100
commit0ed9e986ca461fa075cfe52ce0fd8edc7f884f41 (patch)
tree8788ebd06a849d465463e4d25d3f1747bf60e4b0 /dev-python/pip/files
parentapp-admin/consul: Remove old versions (diff)
downloadgentoo-0ed9e986ca461fa075cfe52ce0fd8edc7f884f41.tar.gz
gentoo-0ed9e986ca461fa075cfe52ce0fd8edc7f884f41.tar.bz2
gentoo-0ed9e986ca461fa075cfe52ce0fd8edc7f884f41.zip
dev-python/pip: Bump to 20.0.2
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'dev-python/pip/files')
-rw-r--r--dev-python/pip/files/pip-20.0.2-disable-system-install.patch29
1 files changed, 29 insertions, 0 deletions
diff --git a/dev-python/pip/files/pip-20.0.2-disable-system-install.patch b/dev-python/pip/files/pip-20.0.2-disable-system-install.patch
new file mode 100644
index 000000000000..c6b5354bc68f
--- /dev/null
+++ b/dev-python/pip/files/pip-20.0.2-disable-system-install.patch
@@ -0,0 +1,29 @@
+From 57d610bbcc721c2e58fd2e9f3197bb3e3acbd935 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
+Date: Sat, 1 Feb 2020 09:14:46 +0100
+Subject: [PATCH] install: Raise an error to avoid breaking python-exec
+
+Running pip without --target, --root, or --user will result in packages
+being installed systemwide. This has a tendency to break python-exec if
+setuptools gets installed or upgraded.
+---
+ src/pip/_internal/commands/install.py | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/src/pip/_internal/commands/install.py b/src/pip/_internal/commands/install.py
+index 02a187c8..025b824b 100644
+--- a/src/pip/_internal/commands/install.py
++++ b/src/pip/_internal/commands/install.py
+@@ -246,6 +246,9 @@ class InstallCommand(RequirementCommand):
+ if options.upgrade:
+ upgrade_strategy = options.upgrade_strategy
+
++ if not options.use_user_site and not options.target_dir and not options.root_path and not os.getenv('GENTOO_PIP_TESTING'):
++ raise CommandError("(Gentoo) Please run pip with the --user option to avoid breaking python-exec")
++
+ cmdoptions.check_dist_restriction(options, check_target=True)
+
+ install_options = options.install_options or []
+--
+2.25.0
+