From 4271115f51609ea8105feb21e9047875a6443340 Mon Sep 17 00:00:00 2001 From: "Xida Ren (Cedar)" Date: Thu, 14 Nov 2024 18:04:45 -0500 Subject: [PATCH] (shortfin) Fix dev_me.py: --clang arg and mishandling of a pathlib.PosixPath (#523) --- shortfin/dev_me.py | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/shortfin/dev_me.py b/shortfin/dev_me.py index 9125c8713..8eacca274 100755 --- a/shortfin/dev_me.py +++ b/shortfin/dev_me.py @@ -105,12 +105,10 @@ def find_clang(self, args): clang_exe = shutil.which("clang") if not clang_exe: return None, None - try: - clang_output = subprocess.check_output( - [clang_exe, "--version"] - ).decode() - except: - return None, None + try: + clang_output = subprocess.check_output([clang_exe, "--version"]).decode() + except: + return None, None if m := re.search(r"clang version ([0-9\.]+)", clang_output): return clang_exe, Version(m.group(1)) return None, None @@ -244,7 +242,7 @@ def configure_mode(env_info: EnvInfo, args): "-e", str(env_info.this_dir), ] - print(f"{' '.join('='.join(kv) for kv in env_vars.items())} \\") + print(f"{' '.join('='.join(str(kv)) for kv in env_vars.items())} \\") print(f" {' '.join(setup_args)}") actual_env_vars = dict(os.environ) actual_env_vars.update(env_vars)