Skip to content

Commit 7b80f6b

Browse files
RachidaTanassathorakivo
authored andcommitted
replace 'mx python' with sys.executable
1 parent 0502206 commit 7b80f6b

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

graalpython/lib-python/3/tkinter/__init__.py

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -34,16 +34,18 @@
3434
import enum
3535
import sys
3636
import types
37+
import os
38+
import subprocess
39+
import sys
40+
3741

3842
def _setup_tkinter():
39-
import os
40-
import subprocess
4143

4244
print("GraalPy requires additional setup to enable Tkinter support on macOS.\n")
4345

4446
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")
4749

4850
print("Install system dependencies:")
4951
print(" brew install tcl-tk@8")
@@ -52,16 +54,16 @@ def _setup_tkinter():
5254
resp = input("Would you like to run pip setup and build now? [Y/n]: ").strip().lower()
5355
if resp in ("", "y", "yes"):
5456
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"])
5759
subprocess.check_call(["brew", "install", "tcl-tk@8"])
5860
current_dir = os.path.dirname(__file__)
5961
tklib_build_path = os.path.abspath(os.path.join(
6062
current_dir,
6163
"../../../../../darwin-aarch64/GRAALPY_JVM_STANDALONE/lib/python3.12/_tkinter/tklib_build.py"
6264
))
6365

64-
subprocess.check_call(["mx", "python", tklib_build_path])
66+
subprocess.check_call([sys.executable, tklib_build_path])
6567
except Exception as build_err:
6668
raise build_err
6769
else:

0 commit comments

Comments
 (0)