aboutsummaryrefslogtreecommitdiffstats
path: root/setuptools/command
diff options
context:
space:
mode:
authorPete Hollobon <bitbucket@hollobon.com>2012-11-22 08:41:56 +0000
committerPete Hollobon <bitbucket@hollobon.com>2012-11-22 08:41:56 +0000
commit36d2b289f92919582dff786969b41d7c6a6dd92f (patch)
treeec4aa1e6045ba8b00eb197e6b467f4f4d1daae43 /setuptools/command
parentb42f4d2e305834e4b92fabbbc56e82d6757aa984 (diff)
downloadexternal_python_setuptools-36d2b289f92919582dff786969b41d7c6a6dd92f.tar.gz
external_python_setuptools-36d2b289f92919582dff786969b41d7c6a6dd92f.tar.bz2
external_python_setuptools-36d2b289f92919582dff786969b41d7c6a6dd92f.zip
Decode contents of pth file within self-extracting exe on Python 3+
--HG-- branch : distribute extra : rebase_source : 3b29e7832874265eddf3a29b4a64e588c17d20e3
Diffstat (limited to 'setuptools/command')
-rwxr-xr-xsetuptools/command/easy_install.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py
index f2260236..337532bc 100755
--- a/setuptools/command/easy_install.py
+++ b/setuptools/command/easy_install.py
@@ -1522,7 +1522,10 @@ def get_exe_prefixes(exe_filename):
if name.endswith('-nspkg.pth'):
continue
if parts[0].upper() in ('PURELIB','PLATLIB'):
- for pth in yield_lines(z.read(name)):
+ contents = z.read(name)
+ if sys.version_info >= (3,):
+ contents = contents.decode()
+ for pth in yield_lines(contents):
pth = pth.strip().replace('\\','/')
if not pth.startswith('import'):
prefixes.append((('%s/%s/' % (parts[0],pth)), ''))