From 7dd40e2dc2a7f4bc2a13e1a00d89c6ab3bb60702 Mon Sep 17 00:00:00 2001 From: yousukseung <85715732+yousukseung@users.noreply.github.com> Date: Wed, 5 Nov 2025 01:45:03 +0000 Subject: [PATCH] Automated change: Fix sanity tests --- src/python/grpcio_sleuth/setup.py | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/src/python/grpcio_sleuth/setup.py b/src/python/grpcio_sleuth/setup.py index 943ec8d6c7357..89409cbcd52e5 100644 --- a/src/python/grpcio_sleuth/setup.py +++ b/src/python/grpcio_sleuth/setup.py @@ -50,21 +50,27 @@ class custom_build_ext(build_ext): def run(self): # Discover the compiler. - compiler = sysconfig.get_config_var('CC') - if not compiler or compiler == 'gcc': - compiler = shutil.which('gcc') or shutil.which('clang') or shutil.which('cc') + compiler = sysconfig.get_config_var("CC") + if not compiler or compiler == "gcc": + compiler = ( + shutil.which("gcc") + or shutil.which("clang") + or shutil.which("cc") + ) bazel_env = os.environ.copy() if compiler: print(f"Setting CC={compiler} for Bazel build") - bazel_env['CC'] = compiler + bazel_env["CC"] = compiler else: print("Warning: Could not find C compiler for Bazel") # Run the bazel build command bazel_cmd = [_BAZEL_PATH, "build", "//test/cpp/sleuth:sleuth.so"] print(f"Running command: {' '.join(bazel_cmd)}") - result = subprocess.run(bazel_cmd, cwd=GRPC_ROOT, check=False, env=bazel_env) + result = subprocess.run( + bazel_cmd, cwd=GRPC_ROOT, check=False, env=bazel_env + ) if result.returncode != 0: print("Bazel build failed!") sys.exit(result.returncode)