Skip to content

Commit

Permalink
Open setup.py in binary mode (#264)
Browse files Browse the repository at this point in the history
Fixes #263.
  • Loading branch information
saj authored and kwlzn committed May 24, 2016
1 parent 81b063a commit 0f66dd8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pex/installer.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,12 @@ def function_wrapper(self, *args, **kw):


class InstallerBase(object):
SETUP_BOOTSTRAP_HEADER = "import io, sys"
SETUP_BOOTSTRAP_HEADER = "import sys"
SETUP_BOOTSTRAP_MODULE = "sys.path.insert(0, %(path)r); import %(module)s"
SETUP_BOOTSTRAP_FOOTER = """
__file__ = 'setup.py'
sys.argv[0] = 'setup.py'
exec(compile(io.open(__file__, encoding='utf-8').read().replace('\\r\\n', '\\n'), __file__, 'exec'))
exec(compile(open(__file__, 'rb').read(), __file__, 'exec'))
"""

class Error(Exception): pass
Expand Down

0 comments on commit 0f66dd8

Please sign in to comment.