[Python-modules-commits] [python-pip] 07/11: merge patched into master
Barry Warsaw
barry at moszumanska.debian.org
Thu Jun 16 14:15:49 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 5e3db4f17c224f12333e79b93c209d2e486621f6
Merge: d8cc897 736faf6
Author: Barry Warsaw <barry at python.org>
Date: Thu Jun 16 15:33:43 2016 +0300
merge patched into master
debian/.git-dpm | 4 ++--
...quirements.patch => 0005-Warn-and-skip-broken-requirements.patch} | 5 +++--
debian/patches/series | 2 +-
debian/patches/set_user_default.patch | 2 +-
4 files changed, 7 insertions(+), 6 deletions(-)
diff --cc debian/.git-dpm
index 78b8000,0000000..1f03964
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
- a7348a6ebf011306e9ef018bab5a2ddfb4dea01a
- a7348a6ebf011306e9ef018bab5a2ddfb4dea01a
++736faf67cd1bc29a23481ec483b63eee5459c5aa
++736faf67cd1bc29a23481ec483b63eee5459c5aa
+030df74bb06ecef9a308cb8315a0c93f1f971cfb
+030df74bb06ecef9a308cb8315a0c93f1f971cfb
+python-pip_8.1.2.orig.tar.gz
+1c13c247967ec5bee6de5fd104c5d78ba30951c7
+1140573
+debianTag="debian/%e%v"
+patchedTag="patched/%e%v"
+upstreamTag="upstream/%e%u"
diff --cc debian/patches/0005-Warn-and-skip-broken-requirements.patch
index ad4c264,0000000..7546e0a
mode 100644,000000..100644
--- a/debian/patches/0005-Warn-and-skip-broken-requirements.patch
+++ b/debian/patches/0005-Warn-and-skip-broken-requirements.patch
@@@ -1,48 -1,0 +1,49 @@@
- From a7348a6ebf011306e9ef018bab5a2ddfb4dea01a Mon Sep 17 00:00:00 2001
++From 736faf67cd1bc29a23481ec483b63eee5459c5aa Mon Sep 17 00:00:00 2001
+From: Barry Warsaw <barry at python.org>
+Date: Thu, 16 Jun 2016 15:29:12 +0300
- Subject: Description: Warn and skip broken requirements.
++Subject: Warn and skip broken requirements.
+
++Description: Warn and skip broken requirements.
+Origin: https://github.com/pypa/pip/pull/3704
+Bug: https://github.com/pypa/pip/issues/3681
+Forwarded: not-needed
+
+Patch-name: skip-bad-requirements.patch
+---
+ pip/operations/freeze.py | 16 ++++++++++++----
+ 1 file changed, 12 insertions(+), 4 deletions(-)
+
+diff --git a/pip/operations/freeze.py b/pip/operations/freeze.py
+index 086922e..7493ced 100644
+--- a/pip/operations/freeze.py
++++ b/pip/operations/freeze.py
+@@ -8,6 +8,7 @@ from pip.req import InstallRequirement
+ from pip.utils import get_installed_distributions
+ from pip._vendor import pkg_resources
+ from pip._vendor.packaging.utils import canonicalize_name
++from pip._vendor.pkg_resources import RequirementParseError
+
+
+ logger = logging.getLogger(__name__)
+@@ -42,10 +43,17 @@ def freeze(
+ for dist in get_installed_distributions(local_only=local_only,
+ skip=(),
+ user_only=user_only):
+- req = pip.FrozenRequirement.from_dist(
+- dist,
+- dependency_links
+- )
++ try:
++ req = pip.FrozenRequirement.from_dist(
++ dist,
++ dependency_links
++ )
++ except RequirementParseError:
++ logger.warning(
++ "Could not parse requirement: %s",
++ dist.project_name
++ )
++ continue
+ installations[req.name] = req
+
+ if requirement:
diff --cc debian/patches/series
index 5dd4e8f,0000000..58e963b
mode 100644,000000..100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@@ -1,5 -1,0 +1,5 @@@
+hands-off-system-packages.patch
+debundle.patch
+handle-unbundled-requests.patch
+set_user_default.patch
- 0005-Description-Warn-and-skip-broken-requirements.patch
++0005-Warn-and-skip-broken-requirements.patch
diff --cc debian/patches/set_user_default.patch
index 91d9bc1,0000000..19a52e2
mode 100644,000000..100644
--- a/debian/patches/set_user_default.patch
+++ b/debian/patches/set_user_default.patch
@@@ -1,93 -1,0 +1,93 @@@
- From 289237da3f9ec6410a1976b4eaefd24bb8e05baa Mon Sep 17 00:00:00 2001
++From 8fe149e53336bea3e78371e124e22526ddf85025 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 6bffdc2..c31f2a7 100644
+--- a/docs/user_guide.rst
++++ b/docs/user_guide.rst
+@@ -509,8 +509,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