@@ -952,7 +952,7 @@ def _graalpy_launcher(managed=False):
952952
953953def graalpy_standalone_home (standalone_type , enterprise = False ):
954954 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
956956 python_home = os .environ .get ("GRAALPY_HOME" , None )
957957 if python_home and "*" in python_home :
958958 python_home = os .path .abspath (glob .glob (python_home )[0 ])
@@ -969,7 +969,7 @@ def graalpy_standalone_home(standalone_type, enterprise=False):
969969 line = f .readline ()
970970 if 'JAVA_VERSION=' not in line :
971971 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 ' ) )
973973 if actual_jdk_version != jdk_version :
974974 mx .abort (f"GRAALPY_HOME is not compatible with the requested JDK version.\n "
975975 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):
990990 mx_args = ['-p' , vm_suite_path , '--env' , env_file ]
991991 if not DISABLE_REBUILD :
992992 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 ] } " ])
994994 out = mx .OutputCapture ()
995995 mx .run_mx (mx_args + ["standalone-home" , "--type" , standalone_type , "python" ], out = out )
996996 python_home = out .data .splitlines ()[- 1 ].strip ()
0 commit comments