From 3c03759c3cd9dd93a427583092630cf1470569bd Mon Sep 17 00:00:00 2001 From: Dan Callaghan Date: Mon, 29 Apr 2013 13:31:32 +1000 Subject: [PATCH] read README.rst as UTF-8 This is necessary on Python 3. The default encoding might be ASCII (for example in a build system) or indeed any encoding other than UTF-8. Use codecs.open since open doesn't accept an encoding in Python 2. --- setup.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 38a7daf..ea764fc 100644 --- a/setup.py +++ b/setup.py @@ -1,4 +1,5 @@ import sys +import codecs # Prevent spurious errors during `python setup.py test`, a la # http://www.eby-sarna.com/pipermail/peak/2010-May/003357.html: @@ -18,7 +19,7 @@ setup( name='nose-progressive', version='1.5', description='A testrunner with a progress bar and smarter tracebacks', - long_description=open('README.rst').read(), + long_description=codecs.open('README.rst', encoding='utf8').read(), author='Erik Rose', author_email='erikrose@grinchcentral.com', license='GPL', -- 1.7.11.7