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