Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

setup fixes for python 3.5 #200

Merged
merged 3 commits into from
Feb 15, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 8 additions & 7 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down Expand Up @@ -71,9 +71,9 @@ def getenv(key):
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:
Expand Down Expand Up @@ -103,6 +103,7 @@ def getenv(key):
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:
Expand Down