aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason R. Coombs <jaraco@jaraco.com>2014-02-05 21:57:56 -0500
committerJason R. Coombs <jaraco@jaraco.com>2014-02-05 21:57:56 -0500
commitf5167344b22647d8bc877019bd73c82c50dfb093 (patch)
tree59933438fc07be1f314bd7f9a73876000ca42593
parentfca0b24f0fa5b41d136b7083449c21ea2705d193 (diff)
downloadexternal_python_setuptools-f5167344b22647d8bc877019bd73c82c50dfb093.tar.gz
external_python_setuptools-f5167344b22647d8bc877019bd73c82c50dfb093.tar.bz2
external_python_setuptools-f5167344b22647d8bc877019bd73c82c50dfb093.zip
Open readme with codecs to enable explicit encoding declaration. Fixes #144.
-rwxr-xr-xsetup.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/setup.py b/setup.py
index 15ba65f6..de254361 100755
--- a/setup.py
+++ b/setup.py
@@ -3,6 +3,7 @@
import sys
import os
import textwrap
+import codecs
# Allow to run setup.py from another directory.
os.chdir(os.path.dirname(os.path.abspath(__file__)))
@@ -81,7 +82,8 @@ class test(_test):
f.write(ep_content)
-readme_file = open('README.txt')
+readme_file = codecs.open('README.txt', encoding='utf-8')
+
# the release script adds hyperlinks to issues
if os.path.exists('CHANGES (links).txt'):
changes_file = open('CHANGES (links).txt')