@@ -22,29 +22,6 @@ def __init__(self):
2222 git_clone (WRAPDB_URL , WRAPDB_LOCATION )
2323 git_checkout_commit (WRAPDB_LOCATION , WRAPDB_HASH )
2424
25- def build (self , project_name ):
26- setup_command = (
27- f"meson setup build/{ project_name } -Dwraps={ project_name } " .split (" " )
28- )
29- meson_setup = subprocess .run (setup_command , cwd = WRAPDB_LOCATION , check = False , env = os .environ .copy (), shell = sys .platform == "win32" , encoding = "utf-8" )
30- subprocess_run_debug (meson_setup , project_name )
31- compile_command = f"meson compile -C build/{ project_name } " .split (" " )
32- meson_compile = subprocess .run (
33- compile_command , cwd = WRAPDB_LOCATION , check = False
34- )
35- subprocess_run_debug (meson_compile , project_name )
36-
37- def find_executables (self , project_name ):
38- full_project_dir = WRAPDB_LOCATION / "build" / project_name / "subprojects"
39- executable_list = []
40- for root , dir , files in os .walk (full_project_dir ):
41- for file in files :
42- # what is the value of variable `root`
43- file_path = Path (root ) / file
44- if os .access (file_path , os .X_OK ) or ".so" in file_path .absolute ():
45- executable_list .append (file_path )
46- return executable_list
47-
4825 def delete_project_files (self , project_name ):
4926 pass
5027
@@ -59,13 +36,11 @@ def get_project_list(self):
5936
6037
6138def meson_build (project_name ):
62- setup_command = f"meson setup build/{ project_name } -Dwraps={ project_name } " .split (
63- " "
64- )
65- meson_setup = subprocess .run (setup_command , cwd = WRAPDB_LOCATION , check = False , env = os .environ .copy (), shell = sys .platform == "win32" , encoding = "utf-8" )
39+ setup_command = f"meson setup -Dwraps={ project_name } " .split (" " )
40+ meson_setup = subprocess .run (setup_command , cwd = os .path .join (WRAPDB_LOCATION , "build" , project_name ), check = False , env = os .environ .copy (), shell = sys .platform == "win32" , encoding = "utf-8" )
6641 subprocess_run_debug (meson_setup , project_name )
67- compile_command = f "meson compile -C build/ { project_name } " .split (" " )
68- meson_compile = subprocess .run (compile_command , cwd = WRAPDB_LOCATION , check = False , env = os .environ .copy (), shell = sys .platform == "win32" , encoding = "utf-8" )
42+ compile_command = "meson compile" .split (" " )
43+ meson_compile = subprocess .run (compile_command , cwd = os . path . join ( WRAPDB_LOCATION , "build" , project_name ) , check = False , env = os .environ .copy (), shell = sys .platform == "win32" , encoding = "utf-8" )
6944 subprocess_run_debug (meson_compile , project_name )
7045
7146
@@ -76,7 +51,7 @@ def find_meson_executables(project_name):
7651 for file in files :
7752 # what is the value of variable `root`
7853 file_path = Path (root ) / file
79- if os .access (file_path , os .X_OK ) or ".so" in file_path . absolute ( ):
54+ if os .access (file_path , os .X_OK ) or ".so" in str ( file_path ):
8055 executable_list .append (file_path )
8156 return executable_list
8257
0 commit comments