diff options
Diffstat (limited to 'sci-libs/Shapely/files/setup_unicode.patch')
-rw-r--r-- | sci-libs/Shapely/files/setup_unicode.patch | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/sci-libs/Shapely/files/setup_unicode.patch b/sci-libs/Shapely/files/setup_unicode.patch new file mode 100644 index 000000000000..89e1b058f0f8 --- /dev/null +++ b/sci-libs/Shapely/files/setup_unicode.patch @@ -0,0 +1,23 @@ +--- 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() |