diff --git a/setup.py b/setup.py index 340190284..0e7243f35 100644 --- a/setup.py +++ b/setup.py @@ -4,6 +4,7 @@ from __future__ import division from __future__ import print_function from __future__ import unicode_literals +import io import json import os import subprocess @@ -16,14 +17,14 @@ PACKAGE_FILE = os.path.join(PACKAGE_DIR, 'package.json') with open(PACKAGE_FILE) as package_file: version_string = json.load(package_file)['version'] -with open('README.md', encoding='utf-8') as f: +with io.open('README.md', encoding='utf-8') as f: long_description = f.read() def get_git_sha(): try: - s = str(subprocess.check_output(['git', 'rev-parse', 'HEAD'])) - return s.strip() + s = subprocess.check_output(['git', 'rev-parse', 'HEAD']) + return s.decode().strip() except Exception: return ''