Pull requests

#29 Merged
Repository
hollobon hollobon
Branch
default
Repository
tarek tarek
Branch
default

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

Author
  1. Pete Hollobon
Reviewers
Description

Fixes bug when installing .exes on Windows with Python 3.

Comments (2)

  1. Jason R. Coombs

    This generally looks like the right patch. I'm going to go ahead and pull it in.

    One question still stands out to me, though - is using the system default encoding appropriate in this case (as 'contents.decode()' does), or are the files PURELIB and PLATLIB guaranteed to be ASCII, or is there some encoding that these files will always be?

  2. Jason R. Coombs

    After reading a little more carefully, I see that PURELIB and PLATLIB are directories containing files (of course) and the files being opened are .pth files. I'm going to punt and assume that the system default encoding is good enough until we find a case where the default encoding is not good enough.