From aac46c8487299caa657e9c400922fcf45a075af1 Mon Sep 17 00:00:00 2001 From: latercomer Date: Sun, 7 Apr 2024 10:58:10 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=A3=E5=86=B3ci=E7=8E=AF=E5=A2=83=E4=B8=8B?= =?UTF-8?q?=E6=89=BE=E4=B8=8D=E5=88=B0PKGS=5FDIR?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tools/building.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tools/building.py b/tools/building.py index a032aef822d..797ffc0076a 100644 --- a/tools/building.py +++ b/tools/building.py @@ -147,8 +147,10 @@ def PrepareBuilding(env, root_directory, has_libcpu=False, remove_components = [ if not "PKGS_DIR" in os.environ: if "ENV_ROOT" in os.environ: os.environ["PKGS_DIR"] = os.path.join(os.environ["ENV_ROOT"], "packages") + elif sys.platform == "win32": + os.environ["PKGS_DIR"] = os.path.join(os.environ["USERPROFILE"], ".env/packages") else: - os.environ["PKGS_DIR"] = os.path.join(Dir('#').abspath, "packages") + os.environ["PKGS_DIR"] = os.path.join(os.environ["HOME"], ".env/packages") sys.path = sys.path + [os.path.join(Rtt_Root, 'tools'), os.path.join(Rtt_Root, 'tools/kconfiglib')]