34
34
import enum
35
35
import sys
36
36
import types
37
+ import os
38
+ import subprocess
39
+ import sys
40
+
37
41
38
42
def _setup_tkinter ():
39
- import os
40
- import subprocess
41
43
42
44
print ("GraalPy requires additional setup to enable Tkinter support on macOS.\n " )
43
45
44
46
print ("Ensure pip and required packages are installed:" )
45
- print (" mx python -m ensurepip" )
46
- print (" mx python -m pip install cffi setuptools\n " )
47
+ print (f " { sys . executable } -m ensurepip" )
48
+ print (f " { sys . executable } -m pip install cffi setuptools\n " )
47
49
48
50
print ("Install system dependencies:" )
49
51
print (" brew install tcl-tk@8" )
@@ -52,16 +54,16 @@ def _setup_tkinter():
52
54
resp = input ("Would you like to run pip setup and build now? [Y/n]: " ).strip ().lower ()
53
55
if resp in ("" , "y" , "yes" ):
54
56
try :
55
- subprocess .check_call (["mx" , "python" , "-m" , "ensurepip" ])
56
- subprocess .check_call (["mx" , "python" , "-m" , "pip" , "install" , "cffi" , "setuptools" ])
57
+ subprocess .check_call ([sys . executable , "-m" , "ensurepip" ])
58
+ subprocess .check_call ([sys . executable , "-m" , "pip" , "install" , "cffi" , "setuptools" ])
57
59
subprocess .check_call (["brew" , "install" , "tcl-tk@8" ])
58
60
current_dir = os .path .dirname (__file__ )
59
61
tklib_build_path = os .path .abspath (os .path .join (
60
62
current_dir ,
61
63
"../../../../../darwin-aarch64/GRAALPY_JVM_STANDALONE/lib/python3.12/_tkinter/tklib_build.py"
62
64
))
63
65
64
- subprocess .check_call (["mx" , "python" , tklib_build_path ])
66
+ subprocess .check_call ([sys . executable , tklib_build_path ])
65
67
except Exception as build_err :
66
68
raise build_err
67
69
else :
0 commit comments