From 2a525e82be23e13fe23e1bf96051ecb8f26f9cb2 Mon Sep 17 00:00:00 2001 From: hydevcode Date: Mon, 19 May 2025 16:41:03 +0800 Subject: [PATCH] =?UTF-8?q?[tools]=20=E4=BF=AE=E5=A4=8Drttstudio=E6=97=A0?= =?UTF-8?q?=E6=B3=95=E5=AF=BC=E5=85=A5bsp=E7=9A=84=E9=97=AE=E9=A2=98=20(#1?= =?UTF-8?q?0290)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tools/building.py | 1 + tools/mkdist.py | 7 +++---- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tools/building.py b/tools/building.py index a570bfb66c..f67c5a4b85 100644 --- a/tools/building.py +++ b/tools/building.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- # # File : building.py # This file is part of RT-Thread RTOS diff --git a/tools/mkdist.py b/tools/mkdist.py index 6f64a2e8e6..89665719d5 100644 --- a/tools/mkdist.py +++ b/tools/mkdist.py @@ -320,7 +320,7 @@ def MkDist_Strip(program, BSP_ROOT, RTT_ROOT, env, project_name, project_path=No # Output summary if removed_files: - print(f"Removed {len(removed_files)} unused source files") + print("Removed {} unused source files".format(len(removed_files))) log_file = os.path.join(dist_dir, 'cleanup.log') with open(log_file, 'w') as f: f.write("Removed source files:\n") @@ -328,13 +328,12 @@ def MkDist_Strip(program, BSP_ROOT, RTT_ROOT, env, project_name, project_path=No if removed_dirs: f.write("\n\nRemoved empty directories:\n") f.write('\n'.join(removed_dirs)) - print(f"Details have been written to {log_file}") + print("Details have been written to {}".format(log_file)) else: print("No unused source files found") # Make zip package like MkDist if project_path is None: zip_dist(dist_dir, project_name) - print(f"Distribution package created: {dist_dir}.zip") - + print("Distribution package created: {}.zip".format(dist_dir)) print('=> Distribution stripped successfully') \ No newline at end of file