[Python-modules-commits] [python-pip] 03/04: merge patched into master

Barry Warsaw barry at moszumanska.debian.org
Wed Feb 10 21:03:14 UTC 2016


This is an automated email from the git hooks/post-receive script.

barry pushed a commit to branch master
in repository python-pip.

commit 7eed6cfba3f37e38f2f9d93fdbe7b75b5b015cbb
Merge: afeb0bd 005bc25
Author: Barry Warsaw <barry at python.org>
Date:   Wed Feb 10 11:21:39 2016 -0500

    merge patched into master

 debian/.git-dpm                       |  4 +-
 debian/patches/series                 |  1 +
 debian/patches/set_user_default.patch | 93 +++++++++++++++++++++++++++++++++++
 docs/user_guide.rst                   |  6 ++-
 pip/commands/install.py               | 20 +++++++-
 5 files changed, 119 insertions(+), 5 deletions(-)

diff --cc debian/.git-dpm
index a0e1054,0000000..76cef04
mode 100644,000000..100644
--- a/debian/.git-dpm
+++ b/debian/.git-dpm
@@@ -1,11 -1,0 +1,11 @@@
 +# see git-dpm(1) from git-dpm package
- 144ba146cde273b815a80859537b09c068fd47e6
- 144ba146cde273b815a80859537b09c068fd47e6
++005bc25c2d771153764cf29cca974f2ed9f98f7c
++005bc25c2d771153764cf29cca974f2ed9f98f7c
 +c9fd1b7c41802c64663a7a4646bf9b546f2389e2
 +c9fd1b7c41802c64663a7a4646bf9b546f2389e2
 +python-pip_8.0.2.orig.tar.gz
 +974a8c345d272b9d9072287f399aab8410067f7e
 +1130183
 +debianTag="debian/%e%v"
 +patchedTag="patched/%e%v"
 +upstreamTag="upstream/%e%u"
diff --cc debian/patches/series
index ecbcd26,0000000..4a3d677
mode 100644,000000..100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@@ -1,3 -1,0 +1,4 @@@
 +hands-off-system-packages.patch
 +debundle.patch
 +handle-unbundled-requests.patch
++set_user_default.patch
diff --cc debian/patches/set_user_default.patch
index 0000000,0000000..b716286
new file mode 100644
--- /dev/null
+++ b/debian/patches/set_user_default.patch
@@@ -1,0 -1,0 +1,93 @@@
++From 005bc25c2d771153764cf29cca974f2ed9f98f7c Mon Sep 17 00:00:00 2001
++From: Barry Warsaw <barry at python.org>
++Date: Wed, 10 Feb 2016 11:18:37 -0500
++Subject: Default to --user in non-virtual environments.
++
++When running as a normal user in a non-virtual environment, default to
++--user and --ignore-installed.  When inside virtual environments or when
++running as root, keep the default behavior.
++
++Author: Didier Roche <didrocks at ubuntu.com>,
++        Barry Warsaw <barry at debian.org>
++Bug: https://github.com/pypa/pip/issues/1668
++Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=725848
++Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/pip/+bug/1419695
++
++Patch-Name: set_user_default.patch
++---
++ docs/user_guide.rst     |  6 ++++--
++ pip/commands/install.py | 20 +++++++++++++++++++-
++ 2 files changed, 23 insertions(+), 3 deletions(-)
++
++diff --git a/docs/user_guide.rst b/docs/user_guide.rst
++index 90f941c..d3f7945 100644
++--- a/docs/user_guide.rst
+++++ b/docs/user_guide.rst
++@@ -508,8 +508,10 @@ which means that all Python distributions support an alternative install
++ location that is specific to a user.  The default location for each OS is
++ explained in the python documentation for the `site.USER_BASE
++ <http://docs.python.org/library/site.html#site.USER_BASE>`_ variable.  This mode
++-of installation can be turned on by specifying the :ref:`--user
++-<install_--user>` option to ``pip install``.
+++of installation is the default on Debian and derivative systems (--user has no
+++effect) when inside non-virtual environments, and when the script is run as
+++non-root. --ignore-installed is then used.  This behavior can be turned off by
+++specifying the :ref:`--system <install_--system>` option to ``pip install``.
++ 
++ Moreover, the "user scheme" can be customized by setting the
++ ``PYTHONUSERBASE`` environment variable, which updates the value of ``site.USER_BASE``.
++diff --git a/pip/commands/install.py b/pip/commands/install.py
++index 7ddde93..13b328f 100644
++--- a/pip/commands/install.py
+++++ b/pip/commands/install.py
++@@ -24,6 +24,7 @@ from pip.utils.deprecation import RemovedInPip10Warning
++ from pip.utils.filesystem import check_path_owner
++ from pip.wheel import WheelCache, WheelBuilder
++ 
+++from pip.locations import running_under_virtualenv
++ 
++ logger = logging.getLogger(__name__)
++ 
++@@ -54,6 +55,12 @@ class InstallCommand(RequirementCommand):
++     def __init__(self, *args, **kw):
++         super(InstallCommand, self).__init__(*args, **kw)
++ 
+++        default_user = True
+++        if running_under_virtualenv():
+++            default_user = False
+++        if os.geteuid() == 0:
+++            default_user = False
+++
++         cmd_opts = self.cmd_opts
++ 
++         cmd_opts.add_option(cmdoptions.constraints())
++@@ -103,6 +110,7 @@ class InstallCommand(RequirementCommand):
++             '-I', '--ignore-installed',
++             dest='ignore_installed',
++             action='store_true',
+++            default=default_user,
++             help='Ignore the installed packages (reinstalling instead).')
++ 
++         cmd_opts.add_option(cmdoptions.no_deps())
++@@ -114,10 +122,20 @@ class InstallCommand(RequirementCommand):
++             '--user',
++             dest='use_user_site',
++             action='store_true',
+++            default=default_user,
++             help="Install to the Python user install directory for your "
++                  "platform. Typically ~/.local/, or %APPDATA%\Python on "
++                  "Windows. (See the Python documentation for site.USER_BASE "
++-                 "for full details.)")
+++                 "for full details.)  On Debian systems, this is the "
+++                 "default when running outside of a virtual environment "
+++                 "and not as root.")
+++
+++        cmd_opts.add_option(
+++            '--system',
+++            dest='use_user_site',
+++            action='store_false',
+++            help="Install using the system scheme (overrides --user on "
+++                 "Debian systems)")
++ 
++         cmd_opts.add_option(
++             '--egg',

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/python-pip.git



More information about the Python-modules-commits mailing list