Группа :: Other
Пакет: doitlive
Главная Изменения Спек Патчи Sources Загрузить Gear Bugs and FR Repocop
Патч: doitlive-3.0.2-alt-open-files-in-utf-8-explicitly.patch
Скачать
Скачать
diff --git a/setup.py b/setup.py
index ea1f9fd..fbfef38 100755
--- a/setup.py
+++ b/setup.py
@@ -1,4 +1,5 @@
# -*- coding: utf-8 -*-
+import codecs
import re
import sys
from setuptools import setup
@@ -17,7 +18,7 @@ def find_version(fname):
Raises RuntimeError if not found.
"""
version = ''
- with open(fname, 'r') as fp:
+ with codecs.open(fname, 'r', encoding='utf-8') as fp:
reg = re.compile(r'__version__ = [\'"]([^\'"]*)[\'"]')
for line in fp:
m = reg.match(line)
@@ -31,7 +32,7 @@ def find_version(fname):
__version__ = find_version('doitlive/__init__.py')
def read(fname):
- with open(fname) as fp:
+ with codecs.open(fname, 'r', encoding='utf-8') as fp:
content = fp.read()
return content