public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Zhu, Yonghong" <yonghong.zhu@intel.com>
To: "Kinney, Michael D" <michael.d.kinney@intel.com>,
	"edk2-devel@lists.01.org" <edk2-devel@lists.01.org>
Cc: "Gao, Liming" <liming.gao@intel.com>,
	"Zhu, Yonghong" <yonghong.zhu@intel.com>
Subject: Re: [Patch] BaseTools/Build: Support python scripts in PREBUILD/POSTBUILD
Date: Thu, 13 Jul 2017 01:00:40 +0000	[thread overview]
Message-ID: <B9726D6DCCFB8B4CA276A9169B02216D51EAB44D@SHSMSX103.ccr.corp.intel.com> (raw)
In-Reply-To: <20170712153252.18760-1-michael.d.kinney@intel.com>

Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com> 

Best Regards,
Zhu Yonghong

-----Original Message-----
From: Kinney, Michael D 
Sent: Wednesday, July 12, 2017 11:33 PM
To: edk2-devel@lists.01.org
Cc: Kinney, Michael D <michael.d.kinney@intel.com>; Gao, Liming <liming.gao@intel.com>; Zhu, Yonghong <yonghong.zhu@intel.com>
Subject: [Patch] BaseTools/Build: Support python scripts in PREBUILD/POSTBUILD

From: Michael Kinney <michael.d.kinney@intel.com>

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 <liming.gao@intel.com>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Michael Kinney <michael.d.kinney@intel.com>
---
 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



      reply	other threads:[~2017-07-13  0:59 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-12 15:32 [Patch] BaseTools/Build: Support python scripts in PREBUILD/POSTBUILD Michael D Kinney
2017-07-13  1:00 ` Zhu, Yonghong [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=B9726D6DCCFB8B4CA276A9169B02216D51EAB44D@SHSMSX103.ccr.corp.intel.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox