You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/sci-libs/Shapely/files/setup_unicode.patch

24 lines
698 B

--- 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()