From 2c58690f733f985300fa1c432fa0bf2103680f9e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20P=C3=A9ters?= Date: Tue, 1 Aug 2017 19:04:14 +0200 Subject: [PATCH] misc: update setup.py to be compatible with python 3 (#17958) --- setup.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/setup.py b/setup.py index 947a79e..27948bb 100755 --- a/setup.py +++ b/setup.py @@ -43,7 +43,7 @@ class eo_sdist(_sdist): sub_commands = [('compile_translations', None)] + _build.sub_commands def run(self): - print "creating VERSION file" + print("creating VERSION file") if os.path.exists('VERSION'): os.remove('VERSION') version = get_version() @@ -51,7 +51,7 @@ class eo_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') @@ -74,7 +74,7 @@ def get_version(): stderr=subprocess.PIPE) result = p.communicate()[0] if p.returncode == 0: - return result.split()[0][1:].replace('-', '.') + return result.decode('ascii').split()[0][1:].replace('-', '.') else: return '0.0.0-%s' % len(subprocess.check_output( ['git', 'rev-list', 'HEAD']).splitlines()) @@ -84,7 +84,7 @@ setup(name="django-mellon", version=get_version(), license="AGPLv3 or later", description="SAML 2.0 authentication for Django", - long_description=file('README').read(), + long_description=open('README').read(), url="http://dev.entrouvert.org/projects/django-mellon/", author="Entr'ouvert", author_email="info@entrouvert.org", -- 2.14.0