PKGBUILDs/aur/python2-dateutil1/python-dateutil-2.1-open-utf-8.patch
Yaron de Leeuw de13ee63dd add python2-dateutil1 and python2-path
These two packages are dependencies of the current version of flexget
2014-11-03 20:32:09 +02:00

21 lines
554 B
Diff

Fix UnicodeDecodeError in setup.py.
https://bugs.gentoo.org/show_bug.cgi?id=410725
--- setup.py
+++ setup.py
@@ -1,5 +1,6 @@
#!/usr/bin/python
from os.path import isfile, join
+import codecs
import glob
import os
import re
@@ -13,7 +14,7 @@
TOPDIR = os.path.dirname(__file__) or "."
VERSION = re.search('__version__ = "([^"]+)"',
- open(TOPDIR + "/dateutil/__init__.py").read()).group(1)
+ codecs.open(TOPDIR + "/dateutil/__init__.py", encoding='utf-8').read()).group(1)
setup(name="python-dateutil",