@@ -952,7 +952,7 @@ def _graalpy_launcher(managed=False):
952
952
953
953
def graalpy_standalone_home (standalone_type , enterprise = False ):
954
954
assert standalone_type in ['native' , 'jvm' ]
955
- jdk_version = mx .get_jdk ().javaCompliance # Not our "get_jdk", because we do not want the jvmci tag.
955
+ jdk_version = mx .get_jdk ().version
956
956
python_home = os .environ .get ("GRAALPY_HOME" , None )
957
957
if python_home and "*" in python_home :
958
958
python_home = os .path .abspath (glob .glob (python_home )[0 ])
@@ -969,7 +969,7 @@ def graalpy_standalone_home(standalone_type, enterprise=False):
969
969
line = f .readline ()
970
970
if 'JAVA_VERSION=' not in line :
971
971
mx .abort (f"GRAALPY_HOME does not contain 'release' file. Cannot check Java version." )
972
- actual_jdk_version = line .strip ('JAVA_VERSION=' ).strip (' "\n \r ' )
972
+ actual_jdk_version = mx . VersionSpec ( line .strip ('JAVA_VERSION=' ).strip (' "\n \r ' ) )
973
973
if actual_jdk_version != jdk_version :
974
974
mx .abort (f"GRAALPY_HOME is not compatible with the requested JDK version.\n "
975
975
f"actual version: '{ actual_jdk_version } ', version string: { line } , requested version: { jdk_version } ." )
@@ -990,7 +990,7 @@ def graalpy_standalone_home(standalone_type, enterprise=False):
990
990
mx_args = ['-p' , vm_suite_path , '--env' , env_file ]
991
991
if not DISABLE_REBUILD :
992
992
dep_type = 'JAVA' if standalone_type == 'jvm' else 'NATIVE'
993
- mx .run_mx (mx_args + ["build" , "--dep" , f"PYTHON_{ dep_type } _STANDALONE_SVM{ svm_distr } _JAVA{ jdk_version } " ])
993
+ mx .run_mx (mx_args + ["build" , "--dep" , f"PYTHON_{ dep_type } _STANDALONE_SVM{ svm_distr } _JAVA{ jdk_version . parts [ 0 ] } " ])
994
994
out = mx .OutputCapture ()
995
995
mx .run_mx (mx_args + ["standalone-home" , "--type" , standalone_type , "python" ], out = out )
996
996
python_home = out .data .splitlines ()[- 1 ].strip ()
0 commit comments