From dfbef9262bca0c99fb74d2b0a92142a56a8ba0c1 Mon Sep 17 00:00:00 2001 From: Paul Marillonnet Date: Fri, 23 Nov 2018 12:16:05 +0100 Subject: [PATCH] python3 compatibility on setup.py (#28278) --- setup.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/setup.py b/setup.py index 27bb3c64..f857ec07 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' -- 2.19.2