From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id E86B821D0B65C for ; Wed, 12 Jul 2017 08:31:06 -0700 (PDT) Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga105.jf.intel.com with ESMTP; 12 Jul 2017 08:32:54 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.40,350,1496127600"; d="scan'208";a="286030669" Received: from mdkinney-mobl1.amr.corp.intel.com ([10.241.98.128]) by fmsmga004.fm.intel.com with ESMTP; 12 Jul 2017 08:32:53 -0700 From: Michael D Kinney To: edk2-devel@lists.01.org Cc: Michael Kinney , Liming Gao , Yonghong Zhu Date: Wed, 12 Jul 2017 08:32:52 -0700 Message-Id: <20170712153252.18760-1-michael.d.kinney@intel.com> X-Mailer: git-send-email 2.13.1.windows.2 Subject: [Patch] BaseTools/Build: Support python scripts in PREBUILD/POSTBUILD X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Jul 2017 15:31:07 -0000 From: Michael Kinney https://bugzilla.tianocore.org/show_bug.cgi?id=627 Add shell=True in Popen() calls to support direct execution of python scripts Cc: Liming Gao Cc: Yonghong Zhu Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Michael Kinney --- BaseTools/Source/Python/build/build.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/BaseTools/Source/Python/build/build.py b/BaseTools/Source/Python/build/build.py index cfd28a4b5b..1e14fb4dcc 100644 --- a/BaseTools/Source/Python/build/build.py +++ b/BaseTools/Source/Python/build/build.py @@ -1036,7 +1036,7 @@ class Build(): os.remove(self.PlatformBuildPath) if sys.platform == "win32": args = ' && '.join((self.Prebuild, 'set > ' + PrebuildEnvFile)) - Process = Popen(args, stdout=PIPE, stderr=PIPE) + Process = Popen(args, stdout=PIPE, stderr=PIPE, shell=True) else: args = ' && '.join((self.Prebuild, 'env > ' + PrebuildEnvFile)) Process = Popen(args, stdout=PIPE, stderr=PIPE, shell=True) @@ -1079,7 +1079,7 @@ class Build(): if self.Postbuild: EdkLogger.info("\n- Postbuild Start -\n") if sys.platform == "win32": - Process = Popen(self.Postbuild, stdout=PIPE, stderr=PIPE) + Process = Popen(self.Postbuild, stdout=PIPE, stderr=PIPE, shell=True) else: Process = Popen(self.Postbuild, stdout=PIPE, stderr=PIPE, shell=True) # launch two threads to read the STDOUT and STDERR -- 2.13.1.windows.2