1 |
commit: 698a23d83720989123978eb212b387bc5fe96e4a |
2 |
Author: Mike Gilbert <floppym <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Jan 4 04:28:30 2017 +0000 |
4 |
Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Jan 4 04:28:30 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=698a23d8 |
7 |
|
8 |
dev-python/pip: disable systemwide installs |
9 |
|
10 |
Bug: https://bugs.gentoo.org/553762 |
11 |
|
12 |
Package-Manager: Portage-2.3.3_p13, Repoman-2.3.1_p6 |
13 |
|
14 |
.../pip/files/pip-disable-system-install.patch | 29 ++++++++++++++++++++++ |
15 |
.../pip/{pip-9.0.1.ebuild => pip-9.0.1-r1.ebuild} | 12 ++++----- |
16 |
2 files changed, 34 insertions(+), 7 deletions(-) |
17 |
|
18 |
diff --git a/dev-python/pip/files/pip-disable-system-install.patch b/dev-python/pip/files/pip-disable-system-install.patch |
19 |
new file mode 100644 |
20 |
index 00000000..9e57245 |
21 |
--- /dev/null |
22 |
+++ b/dev-python/pip/files/pip-disable-system-install.patch |
23 |
@@ -0,0 +1,29 @@ |
24 |
+From 847553da616edabede18c69ba640a32b719b45a8 Mon Sep 17 00:00:00 2001 |
25 |
+From: Mike Gilbert <floppym@g.o> |
26 |
+Date: Tue, 27 Oct 2015 12:20:44 -0400 |
27 |
+Subject: [PATCH] install: Raise an error to avoid breaking python-exec |
28 |
+ |
29 |
+Running pip without --target, --root, or --user will result in packages |
30 |
+being installed systemwide. This has a tendency to break python-exec if |
31 |
+setuptools gets installed or upgraded. |
32 |
+--- |
33 |
+ pip/commands/install.py | 3 +++ |
34 |
+ 1 file changed, 3 insertions(+) |
35 |
+ |
36 |
+diff --git a/pip/commands/install.py b/pip/commands/install.py |
37 |
+index 46cd9f2..36b72f2 100644 |
38 |
+--- a/pip/commands/install.py |
39 |
++++ b/pip/commands/install.py |
40 |
+@@ -204,6 +204,9 @@ class InstallCommand(RequirementCommand): |
41 |
+ ) |
42 |
+ options.ignore_installed = True |
43 |
+ |
44 |
++ if not options.use_user_site and not options.target_dir and not options.root_path: |
45 |
++ raise CommandError("(Gentoo) Please run pip with the --user option to avoid breaking python-exec") |
46 |
++ |
47 |
+ if options.build_dir: |
48 |
+ options.build_dir = os.path.abspath(options.build_dir) |
49 |
+ |
50 |
+-- |
51 |
+2.6.2 |
52 |
+ |
53 |
|
54 |
diff --git a/dev-python/pip/pip-9.0.1.ebuild b/dev-python/pip/pip-9.0.1-r1.ebuild |
55 |
similarity index 93% |
56 |
rename from dev-python/pip/pip-9.0.1.ebuild |
57 |
rename to dev-python/pip/pip-9.0.1-r1.ebuild |
58 |
index 8cd1b05..4affc43 100644 |
59 |
--- a/dev-python/pip/pip-9.0.1.ebuild |
60 |
+++ b/dev-python/pip/pip-9.0.1-r1.ebuild |
61 |
@@ -1,4 +1,4 @@ |
62 |
-# Copyright 1999-2016 Gentoo Foundation |
63 |
+# Copyright 1999-2017 Gentoo Foundation |
64 |
# Distributed under the terms of the GNU General Public License v2 |
65 |
# $Id$ |
66 |
|
67 |
@@ -58,12 +58,10 @@ RESTRICT="test" |
68 |
DEPEND="dev-python/setuptools[${PYTHON_USEDEP}]" |
69 |
RDEPEND="${DEPEND}" |
70 |
|
71 |
-src_prepare() { |
72 |
- epatch "${FILESDIR}"/${PN}-9.0.1-disable-version-check.patch |
73 |
- |
74 |
- distutils-r1_src_prepare |
75 |
- eapply_user |
76 |
-} |
77 |
+PATCHES=( |
78 |
+ "${FILESDIR}/pip-disable-system-install.patch" |
79 |
+ "${FILESDIR}/${PN}-9.0.1-disable-version-check.patch" |
80 |
+) |
81 |
|
82 |
python_install_all() { |
83 |
local DOCS=( AUTHORS.txt docs/*.rst ) |