Commits

Pete Hollobon committed 5c172b1

Decode contents of pth file within self-extracting exe on Python 3+

  • Participants
  • Parent commits f1b8c7c

Comments (0)

Files changed (1)

File setuptools/command/easy_install.py

             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)), ''))