aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason R. Coombs <jaraco@jaraco.com>2014-05-03 12:58:13 -0400
committerJason R. Coombs <jaraco@jaraco.com>2014-05-03 12:58:13 -0400
commit0515f30739d1dce3bc10921db403f336358ef447 (patch)
tree6c5427585542ea6dc368f7f65fe1c3bddb66c28a
parent36addf1ea62cde1ab5884f91e18ac4d1954529cc (diff)
downloadexternal_python_setuptools-0515f30739d1dce3bc10921db403f336358ef447.tar.gz
external_python_setuptools-0515f30739d1dce3bc10921db403f336358ef447.tar.bz2
external_python_setuptools-0515f30739d1dce3bc10921db403f336358ef447.zip
Backed out changeset: b0a2fcc5275a Ref #193
-rwxr-xr-xsetuptools/command/egg_info.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/setuptools/command/egg_info.py b/setuptools/command/egg_info.py
index 30873e19..4f5c9694 100755
--- a/setuptools/command/egg_info.py
+++ b/setuptools/command/egg_info.py
@@ -304,7 +304,8 @@ def write_file(filename, contents):
sequence of strings without line terminators) to it.
"""
contents = "\n".join(contents)
- contents = contents.encode("utf-8")
+ if sys.version_info >= (3,):
+ contents = contents.encode("utf-8")
f = open(filename, "wb") # always write POSIX-style manifest
f.write(contents)
f.close()