From 920e1fe19e224095f1673f619d04bd3c049c4221 Mon Sep 17 00:00:00 2001 From: jersobh Date: Tue, 28 Feb 2017 02:46:16 -0300 Subject: [PATCH] Fix utf8 read --- setup.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/setup.py b/setup.py index c2cf3d1..6e450da 100644 --- a/setup.py +++ b/setup.py @@ -1,4 +1,4 @@ -# -*- coding: utf-8 -*- +# encoding=utf8 from setuptools import setup from codecs import open import platform @@ -23,7 +23,7 @@ def run_tests(self): sys.exit(errno) def mkdir_p(path): -#thanks http://stackoverflow.com/a/600612/965638 + try: os.makedirs(path) except OSError as exc: # Python >2.5 @@ -51,7 +51,8 @@ def mkdir_p(path): 'platform/ubuntu/fgmk-map.svg']), ('share/mime', ['platform/ubuntu/fgmk.xml'])]) -with open('fgmk/__init__.py', 'r') as fd: + +with open('fgmk/__init__.py', 'r', encoding="utf-8") as fd: version = re.search(r'^__version__\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1)