public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [Patch] BaseTools/Build: Support python scripts in PREBUILD/POSTBUILD
@ 2017-07-12 15:32 Michael D Kinney
  2017-07-13  1:00 ` Zhu, Yonghong
  0 siblings, 1 reply; 2+ messages in thread
From: Michael D Kinney @ 2017-07-12 15:32 UTC (permalink / raw)
  To: edk2-devel; +Cc: Michael Kinney, Liming Gao, Yonghong Zhu

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



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [Patch] BaseTools/Build: Support python scripts in PREBUILD/POSTBUILD
  2017-07-12 15:32 [Patch] BaseTools/Build: Support python scripts in PREBUILD/POSTBUILD Michael D Kinney
@ 2017-07-13  1:00 ` Zhu, Yonghong
  0 siblings, 0 replies; 2+ messages in thread
From: Zhu, Yonghong @ 2017-07-13  1:00 UTC (permalink / raw)
  To: Kinney, Michael D, edk2-devel@lists.01.org; +Cc: Gao, Liming, Zhu, Yonghong

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



^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-07-13  0:59 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox