1 |
slis 14/06/20 09:29:35 |
2 |
|
3 |
Added: setup_unicode.patch |
4 |
Log: |
5 |
Fixed 513950 |
6 |
|
7 |
(Portage version: 2.2.10/cvs/Linux x86_64, signed Manifest commit with key 0x55265D89) |
8 |
|
9 |
Revision Changes Path |
10 |
1.1 sci-libs/Shapely/files/setup_unicode.patch |
11 |
|
12 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-libs/Shapely/files/setup_unicode.patch?rev=1.1&view=markup |
13 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-libs/Shapely/files/setup_unicode.patch?rev=1.1&content-type=text/plain |
14 |
|
15 |
Index: setup_unicode.patch |
16 |
=================================================================== |
17 |
--- setup.py.orig 2014-06-20 10:27:26.638779565 +0200 |
18 |
+++ setup.py 2014-06-20 10:27:29.885446151 +0200 |
19 |
@@ -1,4 +1,5 @@ |
20 |
#!/usr/bin/env python |
21 |
+# -*- coding: utf-8 -*- |
22 |
|
23 |
from __future__ import print_function |
24 |
|
25 |
@@ -74,8 +75,12 @@ |
26 |
readme_text = fp.read() |
27 |
readme_text = readme_text.replace(".. include:: CREDITS.txt", "") |
28 |
|
29 |
-with open('CREDITS.txt', 'r') as fp: |
30 |
- credits = fp.read() |
31 |
+if sys.version_info[0] == 3: |
32 |
+ with open('CREDITS.txt', 'r', encoding='utf-8') as fp: |
33 |
+ credits = fp.read() |
34 |
+elif sys.version_info[0] == 2: |
35 |
+ with open('CREDITS.txt', 'r') as fp: |
36 |
+ credits = fp.read().decode('utf-8') |
37 |
|
38 |
with open('CHANGES.txt', 'r') as fp: |
39 |
changes_text = fp.read() |