Skip to content

Commit

Permalink
Fix setup fails due to python2's encoding
Browse files Browse the repository at this point in the history
This solves ssut#11
  • Loading branch information
ssut committed Apr 1, 2017
1 parent eaac0f1 commit 2d99780
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import googletrans
import os.path
from setuptools import setup, find_packages
Expand All @@ -7,8 +8,8 @@
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

Expand Down

0 comments on commit 2d99780

Please sign in to comment.