mirror of https://github.com/kivy/pyjnius.git
Merge pull request #200 from danielepantaleone/master
setup fixes for python 3.5
This commit is contained in:
commit
707cc93d1b
15
setup.py
15
setup.py
|
@ -14,11 +14,11 @@ def getenv(key):
|
||||||
val = environ.get(key)
|
val = environ.get(key)
|
||||||
if val is not None:
|
if val is not None:
|
||||||
if PY3:
|
if PY3:
|
||||||
return val.decode()
|
try:
|
||||||
else:
|
return val.decode()
|
||||||
return val
|
except AttributeError:
|
||||||
else:
|
return val
|
||||||
return val
|
return val
|
||||||
|
|
||||||
files = [
|
files = [
|
||||||
'jni.pxi',
|
'jni.pxi',
|
||||||
|
@ -71,9 +71,9 @@ elif platform == 'darwin':
|
||||||
framework = subprocess.Popen('/usr/libexec/java_home',
|
framework = subprocess.Popen('/usr/libexec/java_home',
|
||||||
shell=True, stdout=subprocess.PIPE).communicate()[0]
|
shell=True, stdout=subprocess.PIPE).communicate()[0]
|
||||||
if PY3:
|
if PY3:
|
||||||
framework = framework.decode();
|
framework = framework.decode()
|
||||||
framework = framework.strip()
|
framework = framework.strip()
|
||||||
print('java_home: {0}\n'.format(framework));
|
print('java_home: {0}\n'.format(framework))
|
||||||
if not framework:
|
if not framework:
|
||||||
raise Exception('You must install Java on your Mac OS X distro')
|
raise Exception('You must install Java on your Mac OS X distro')
|
||||||
if '1.6' in framework:
|
if '1.6' in framework:
|
||||||
|
@ -103,6 +103,7 @@ else:
|
||||||
if not jdk_home or not exists(jdk_home):
|
if not jdk_home or not exists(jdk_home):
|
||||||
raise Exception('Unable to determine JDK_HOME')
|
raise Exception('Unable to determine JDK_HOME')
|
||||||
|
|
||||||
|
jre_home = None
|
||||||
if exists(join(jdk_home, 'jre')):
|
if exists(join(jdk_home, 'jre')):
|
||||||
jre_home = join(jdk_home, 'jre')
|
jre_home = join(jdk_home, 'jre')
|
||||||
if not jre_home:
|
if not jre_home:
|
||||||
|
|
Loading…
Reference in New Issue