[Python-modules-commits] r29239 - in packages/python-pip/trunk/debian (2 files)
barry at users.alioth.debian.org
barry at users.alioth.debian.org
Fri Jun 6 16:17:48 UTC 2014
Date: Friday, June 6, 2014 @ 16:17:43
Author: barry
Revision: 29239
* Team upload.
* d/patches/use-venv-wheels.patch: Use OSError and check errno
instead of using FileNotFoundError, since the latter doesn't
exist in Python 2.
Modified:
packages/python-pip/trunk/debian/changelog
packages/python-pip/trunk/debian/patches/use-venv-wheels.patch
Modified: packages/python-pip/trunk/debian/changelog
===================================================================
--- packages/python-pip/trunk/debian/changelog 2014-06-06 16:16:50 UTC (rev 29238)
+++ packages/python-pip/trunk/debian/changelog 2014-06-06 16:17:43 UTC (rev 29239)
@@ -1,3 +1,12 @@
+python-pip (1.5.6-2) UNRELEASED; urgency=medium
+
+ * Team upload.
+ * d/patches/use-venv-wheels.patch: Use OSError and check errno
+ instead of using FileNotFoundError, since the latter doesn't
+ exist in Python 2.
+
+ -- Barry Warsaw <barry at debian.org> Fri, 06 Jun 2014 10:44:30 -0400
+
python-pip (1.5.6-1) unstable; urgency=medium
* Team upload.
Modified: packages/python-pip/trunk/debian/patches/use-venv-wheels.patch
===================================================================
--- packages/python-pip/trunk/debian/patches/use-venv-wheels.patch 2014-06-06 16:16:50 UTC (rev 29238)
+++ packages/python-pip/trunk/debian/patches/use-venv-wheels.patch 2014-06-06 16:17:43 UTC (rev 29239)
@@ -8,10 +8,12 @@
--- a/pip/__init__.py
+++ b/pip/__init__.py
-@@ -5,6 +5,53 @@
+@@ -4,6 +4,56 @@
+
import sys
import re
-
++import errno
++
+# Debian virtual environment (venv) support. When inside a venv, we have to
+# add all the devendorized wheels to sys.path from inside the venv, otherwise
+# the devendorized packages won't be found. Only do this in a venv so it
@@ -55,13 +57,14 @@
+ for filename in os.listdir(wheel_dir):
+ if os.path.splitext(filename)[1] == '.whl':
+ sys.path.insert(0, os.path.join(wheel_dir, filename))
-+ except FileNotFoundError:
-+ # Oh well.
-+ pass
++ # FileNotFoundError doesn't exist in Python 2, but ignore it anyway.
++ except OSError as error:
++ if error.errno != errno.ENOENT:
++ raise
+
+
from pip.exceptions import InstallationError, CommandError, PipError
from pip.log import logger
- from pip.util import get_installed_distributions, get_prog
--- a/setup.py
+++ b/setup.py
@@ -41,7 +41,13 @@
More information about the Python-modules-commits
mailing list