From 2ee8b2e5fd1a7751aba120ef7994c30e143667dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20P=C3=A9ters?= Date: Mon, 26 Mar 2018 09:30:50 +0200 Subject: [PATCH] adapt setup.py for python3 compatibility --- setup.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/setup.py b/setup.py index 2e28605..5bcca4c 100755 --- a/setup.py +++ b/setup.py @@ -46,7 +46,7 @@ class TestCommand(distutils.core.Command): class eo_sdist(sdist): def run(self): - print "creating VERSION file" + print("creating VERSION file") if os.path.exists('VERSION'): os.remove('VERSION') version = get_version() @@ -54,7 +54,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') @@ -72,7 +72,7 @@ def get_version(): stderr=subprocess.PIPE) result = p.communicate()[0] if p.returncode == 0: - version = result.split()[0][1:] + version = str(result.split()[0][1:]) version = version.replace('-', '.') return version return '0.0.0' @@ -83,7 +83,7 @@ setuptools.setup( license='GPLv3 or later', description='Common API to use all French online payment credit card ' 'processing services', - long_description=file( + long_description=open( os.path.join( os.path.dirname(__file__), 'README.txt')).read(),