From 6193a244b8206540c67e7a1821da7586fbb07a88 Mon Sep 17 00:00:00 2001 From: yousukseung <85715732+yousukseung@users.noreply.github.com> Date: Thu, 30 Oct 2025 05:51:06 +0000 Subject: [PATCH] Automated change: Fix sanity tests --- src/python/grpcio_sleuth/grpc_sleuth/sleuth_cli.py | 2 +- src/python/grpcio_sleuth/setup.py | 14 ++++++++------ 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/src/python/grpcio_sleuth/grpc_sleuth/sleuth_cli.py b/src/python/grpcio_sleuth/grpc_sleuth/sleuth_cli.py index a0c219ff3e339..2116ff636ac20 100644 --- a/src/python/grpcio_sleuth/grpc_sleuth/sleuth_cli.py +++ b/src/python/grpcio_sleuth/grpc_sleuth/sleuth_cli.py @@ -25,6 +25,6 @@ def main(): exit_code = sleuth_lib.run_sleuth(sys.argv[1:]) sys.exit(exit_code) + if __name__ == "__main__": main() - diff --git a/src/python/grpcio_sleuth/setup.py b/src/python/grpcio_sleuth/setup.py index 8003fa2ac74a5..b956d01e97373 100644 --- a/src/python/grpcio_sleuth/setup.py +++ b/src/python/grpcio_sleuth/setup.py @@ -66,7 +66,9 @@ def run(self): # This makes the .so available during the extension build process. build_lib_dest_dir = os.path.join(self.build_lib, "grpc_sleuth", "lib") os.makedirs(build_lib_dest_dir, exist_ok=True) - shutil.copy(_SLEUTH_SO_SRC, os.path.join(build_lib_dest_dir, "libsleuth.so")) + shutil.copy( + _SLEUTH_SO_SRC, os.path.join(build_lib_dest_dir, "libsleuth.so") + ) # Add the library directory for the current build to find libsleuth.so during extension linking for ext in self.extensions: @@ -104,7 +106,7 @@ def run(self): language="c++", extra_compile_args=["-std=c++17"], libraries=["sleuth"], - runtime_library_dirs=["$ORIGIN/lib"] + runtime_library_dirs=["$ORIGIN/lib"], ) ] @@ -125,13 +127,13 @@ def run(self): setup_requires=SETUP_REQUIRES, ext_modules=extensions, cmdclass={ - 'build_ext': custom_build_ext, + "build_ext": custom_build_ext, }, entry_points={ - 'console_scripts': [ - 'grpc_sleuth=grpc_sleuth.sleuth_cli:main', + "console_scripts": [ + "grpc_sleuth=grpc_sleuth.sleuth_cli:main", ], }, - package_data={'grpc_sleuth': ['lib/*.so']}, + package_data={"grpc_sleuth": ["lib/*.so"]}, include_package_data=True, )