Skip to content

Commit

Permalink
Switch to uv. Deleted unwanted directories
Browse files Browse the repository at this point in the history
Signed-off-by: Prabhu Subramanian <[email protected]>
  • Loading branch information
prabhu committed Feb 25, 2025
1 parent 462e537 commit dcd25be
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions blint_db/handlers/language_handlers/meson_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import os
import shutil
import subprocess
import sys
from pathlib import Path

from blint_db import CWD, WRAPDB_HASH, WRAPDB_LOCATION, WRAPDB_URL
Expand All @@ -25,7 +26,7 @@ def build(self, project_name):
setup_command = (
f"meson setup build/{project_name} -Dwraps={project_name}".split(" ")
)
meson_setup = subprocess.run(setup_command, cwd=WRAPDB_LOCATION, check=False)
meson_setup = subprocess.run(setup_command, cwd=WRAPDB_LOCATION, check=False, env=os.environ.copy(), shell=sys.platform == "win32", encoding="utf-8")
subprocess_run_debug(meson_setup, project_name)
compile_command = f"meson compile -C build/{project_name}".split(" ")
meson_compile = subprocess.run(
Expand All @@ -43,7 +44,7 @@ def find_executables(self, project_name):
if os.access(file_path, os.X_OK):
full_path = file_path
file_output = subprocess.run(
["file", full_path], capture_output=True, check=False
["file", full_path], capture_output=True, check=False, env=os.environ.copy(), shell=sys.platform == "win32", encoding="utf-8"
)
if b"ELF" in file_output.stdout:
executable_list.append(full_path)
Expand All @@ -66,10 +67,10 @@ def meson_build(project_name):
setup_command = f"meson setup build/{project_name} -Dwraps={project_name}".split(
" "
)
meson_setup = subprocess.run(setup_command, cwd=WRAPDB_LOCATION, check=False)
meson_setup = subprocess.run(setup_command, cwd=WRAPDB_LOCATION, check=False, env=os.environ.copy(), shell=sys.platform == "win32", encoding="utf-8")
subprocess_run_debug(meson_setup, project_name)
compile_command = f"meson compile -C build/{project_name}".split(" ")
meson_compile = subprocess.run(compile_command, cwd=WRAPDB_LOCATION, check=False)
meson_compile = subprocess.run(compile_command, cwd=WRAPDB_LOCATION, check=False, env=os.environ.copy(), shell=sys.platform == "win32", encoding="utf-8")
subprocess_run_debug(meson_compile, project_name)


Expand All @@ -83,7 +84,7 @@ def find_meson_executables(project_name):
if os.access(file_path, os.X_OK):
full_path = file_path
file_output = subprocess.run(
["file", full_path], capture_output=True, check=False
["file", full_path], capture_output=True, check=False, env=os.environ.copy(), shell=sys.platform == "win32", encoding="utf-8"
)
if b"ELF" in file_output.stdout:
executable_list.append(full_path)
Expand All @@ -92,4 +93,4 @@ def find_meson_executables(project_name):

def strip_executables(file_path, loc=WRAPDB_LOCATION):
strip_command = f"strip --strip-all {file_path}".split(" ")
subprocess.run(strip_command, cwd=loc, check=False)
subprocess.run(strip_command, cwd=loc, check=False, env=os.environ.copy(), shell=sys.platform == "win32", encoding="utf-8")

0 comments on commit dcd25be

Please sign in to comment.