python-setuptools: enforce __PYVENV_LAUNCHER__ env var use 1739/head
authorAlexandru Ardelean <ardeleanalex@gmail.com>
Mon, 31 Aug 2015 11:11:34 +0000 (14:11 +0300)
committerAlexandru Ardelean <ardeleanalex@gmail.com>
Mon, 31 Aug 2015 11:11:34 +0000 (14:11 +0300)
Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
lang/python-setuptools/patches/0002-fix-pyvenv-environment-get.patch [new file with mode: 0644]

diff --git a/lang/python-setuptools/patches/0002-fix-pyvenv-environment-get.patch b/lang/python-setuptools/patches/0002-fix-pyvenv-environment-get.patch
new file mode 100644 (file)
index 0000000..c46a5f3
--- /dev/null
@@ -0,0 +1,13 @@
+diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py
+index df1655b..24c34e5 100755
+--- a/setuptools/command/easy_install.py
++++ b/setuptools/command/easy_install.py
+@@ -1885,7 +1885,7 @@ class CommandSpec(list):
+             return param
+         if isinstance(param, list):
+             return cls(param)
+-        if param is None:
++        if param is None or os.environ.get('__PYVENV_LAUNCHER__'):
+             return cls.from_environment()
+         # otherwise, assume it's a string.
+         return cls.from_string(param)