Sisyphus repository
Last update: 1 october 2023 | SRPMs: 18631 | Visits: 37875814
en ru br
ALT Linux repos
S:3.0.3-alt2

Group :: Other
RPM: doitlive

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs and FR  Repocop 

Patch: doitlive-3.0.2-alt-open-files-in-utf-8-explicitly.patch
Download


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
 
 
design & coding: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
current maintainer: Michael Shigorin