From d9475a695a9a70358114e0e0e97524d40bc663e8 Mon Sep 17 00:00:00 2001 From: Daniele Pantaleone Date: Sun, 7 Feb 2016 15:08:50 +0100 Subject: [PATCH 1/3] setup: fixed setup no longer working under python 3.5 #199 --- setup.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/setup.py b/setup.py index f05aba0..e6e370b 100644 --- a/setup.py +++ b/setup.py @@ -14,11 +14,11 @@ def getenv(key): val = environ.get(key) if val is not None: if PY3: - return val.decode() - else: - return val - else: - return val + try: + return val.decode() + except AttributeError: + return val + return val files = [ 'jni.pxi', From c8bfdc83517206724ea4a3c1f7a4f37dd2f76bfc Mon Sep 17 00:00:00 2001 From: Daniele Pantaleone Date: Sun, 7 Feb 2016 15:09:40 +0100 Subject: [PATCH 2/3] setup: removed unnecessary semicolons --- setup.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index e6e370b..4b9df04 100644 --- a/setup.py +++ b/setup.py @@ -71,9 +71,9 @@ elif platform == 'darwin': framework = subprocess.Popen('/usr/libexec/java_home', shell=True, stdout=subprocess.PIPE).communicate()[0] if PY3: - framework = framework.decode(); + framework = framework.decode() framework = framework.strip() - print('java_home: {0}\n'.format(framework)); + print('java_home: {0}\n'.format(framework)) if not framework: raise Exception('You must install Java on your Mac OS X distro') if '1.6' in framework: From 5d8267c340d5bc630c8868fca2216ac87f33509c Mon Sep 17 00:00:00 2001 From: Daniele Pantaleone Date: Sun, 7 Feb 2016 15:10:49 +0100 Subject: [PATCH 3/3] setup: fixed jre_home variable referenced before assignment --- setup.py | 1 + 1 file changed, 1 insertion(+) diff --git a/setup.py b/setup.py index 4b9df04..1b6b313 100644 --- a/setup.py +++ b/setup.py @@ -103,6 +103,7 @@ else: if not jdk_home or not exists(jdk_home): raise Exception('Unable to determine JDK_HOME') + jre_home = None if exists(join(jdk_home, 'jre')): jre_home = join(jdk_home, 'jre') if not jre_home: