@@ -22,29 +22,6 @@ def __init__(self):
22
22
git_clone (WRAPDB_URL , WRAPDB_LOCATION )
23
23
git_checkout_commit (WRAPDB_LOCATION , WRAPDB_HASH )
24
24
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
-
48
25
def delete_project_files (self , project_name ):
49
26
pass
50
27
@@ -59,13 +36,11 @@ def get_project_list(self):
59
36
60
37
61
38
def 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" )
66
41
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" )
69
44
subprocess_run_debug (meson_compile , project_name )
70
45
71
46
@@ -76,7 +51,7 @@ def find_meson_executables(project_name):
76
51
for file in files :
77
52
# what is the value of variable `root`
78
53
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 ):
80
55
executable_list .append (file_path )
81
56
return executable_list
82
57
0 commit comments