Przeglądaj źródła

Merge branch 'main' of https://github.com/pocketpy/pocketpy

blueloveTH 4 dni temu
rodzic
commit
9e10fd7658
2 zmienionych plików z 3 dodań i 3 usunięć
  1. 1 1
      cmake_build.py
  2. 2 2
      scripts/run_tests.py

+ 1 - 1
cmake_build.py

@@ -2,7 +2,7 @@ import os
 import sys
 import sys
 import shutil
 import shutil
 
 
-assert os.system("python prebuild.py") == 0
+assert os.system(f'"{sys.executable}" prebuild.py') == 0
 
 
 if not os.path.exists("build"):
 if not os.path.exists("build"):
     os.mkdir("build")
     os.mkdir("build")

+ 2 - 2
scripts/run_tests.py

@@ -7,7 +7,7 @@ pkpy_exe = 'main.exe' if sys.platform == 'win32' else './main'
 
 
 def test_file(filepath, cpython=False):
 def test_file(filepath, cpython=False):
     if cpython:
     if cpython:
-        return os.system("python " + filepath) == 0
+        return os.system(f'"{sys.executable}" {filepath}') == 0
     code = os.system(pkpy_exe + ' ' + filepath)
     code = os.system(pkpy_exe + ' ' + filepath)
     if code != 0:
     if code != 0:
         print('Return code:', code)
         print('Return code:', code)
@@ -74,7 +74,7 @@ exit()
             print(res.stdout)
             print(res.stdout)
             exit(1)
             exit(1)
 
 
-code = os.system(f'python compileall.py {pkpy_exe} tests tmp/tests')
+code = os.system(f'"{sys.executable}" compileall.py {pkpy_exe} tests tmp/tests')
 assert code == 0
 assert code == 0
 
 
 if len(sys.argv) == 2:
 if len(sys.argv) == 2: