diff --git a/setup.py b/setup.py index 85fee6ae6..875e19829 100755 --- a/setup.py +++ b/setup.py @@ -54,7 +54,7 @@ class sdist(_sdist): sub_commands = [('compile_translations', None)] + _sdist.sub_commands def run(self): - print "creating VERSION file" + print("creating VERSION file") if os.path.exists('VERSION'): os.remove('VERSION') version = get_version() @@ -62,7 +62,7 @@ class sdist(_sdist): version_file.write(version) version_file.close() _sdist.run(self) - print "removing VERSION file" + print("removing VERSION file") if os.path.exists('VERSION'): os.remove('VERSION') @@ -89,7 +89,7 @@ def get_version(): else: result = '0.0.0-%s' % len(subprocess.check_output( ['git', 'rev-list', 'HEAD']).splitlines()) - return result.replace('-', '.').replace('.g', '+g') + return result.decode('utf-8').replace('-', '.').replace('.g', '+g') return '0.0.0'