From 2d99780083dbe0ecca99f881f6be5a02959e24ad Mon Sep 17 00:00:00 2001 From: SuHun Han Date: Sat, 1 Apr 2017 20:03:02 +0900 Subject: [PATCH] Fix setup fails due to python2's encoding This solves #11 --- setup.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index 0370b41..3706ada 100644 --- a/setup.py +++ b/setup.py @@ -1,4 +1,5 @@ #!/usr/bin/env python +# -*- coding: utf-8 -*- import googletrans import os.path from setuptools import setup, find_packages @@ -7,8 +8,8 @@ from setuptools import setup, find_packages def readme(): path = os.path.join(os.path.dirname(__file__), 'README.rst') try: - with open(path) as f: - return f.read() + with open(path, 'rb') as f: + return f.read().decode('utf8') except IOError: pass