slis        14/06/20 09:29:35

  Added:                setup_unicode.patch
  Log:
  Fixed 513950
  
  (Portage version: 2.2.10/cvs/Linux x86_64, signed Manifest commit with key 
0x55265D89)

Revision  Changes    Path
1.1                  sci-libs/Shapely/files/setup_unicode.patch

file : 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-libs/Shapely/files/setup_unicode.patch?rev=1.1&view=markup
plain: 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-libs/Shapely/files/setup_unicode.patch?rev=1.1&content-type=text/plain

Index: setup_unicode.patch
===================================================================
--- setup.py.orig       2014-06-20 10:27:26.638779565 +0200
+++ setup.py    2014-06-20 10:27:29.885446151 +0200
@@ -1,4 +1,5 @@
 #!/usr/bin/env python
+# -*- coding: utf-8 -*-
 
 from __future__ import print_function
 
@@ -74,8 +75,12 @@
     readme_text = fp.read()
 readme_text = readme_text.replace(".. include:: CREDITS.txt", "")
 
-with open('CREDITS.txt', 'r') as fp:
-    credits = fp.read()
+if sys.version_info[0] == 3:
+    with open('CREDITS.txt', 'r', encoding='utf-8') as fp:
+        credits = fp.read()
+elif sys.version_info[0] == 2:
+    with open('CREDITS.txt', 'r') as fp:
+        credits = fp.read().decode('utf-8')
 
 with open('CHANGES.txt', 'r') as fp:
     changes_text = fp.read()




Reply via email to