From cbdc0d56b4cf1cb968c5255b01be0a376c07b749 Mon Sep 17 00:00:00 2001 From: =?utf8?q?C=C3=A9dric=20Aguerre?= Date: Tue, 18 Oct 2016 18:57:49 +0200 Subject: [PATCH] restore all subprocess pipes - need a verbose/quiet mode --- scripts/salome_compile.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/salome_compile.py b/scripts/salome_compile.py index 4b837d2..587955e 100644 --- a/scripts/salome_compile.py +++ b/scripts/salome_compile.py @@ -18,7 +18,7 @@ def __getCurrentVersion(srcDir,pattern, config): return s elif isinstance(srcLoc,tuple): dirGitLoc=os.path.splitext(os.path.basename(srcLoc[0]))[0] - p=subprocess.Popen(["git","rev-parse","--verify","HEAD"],cwd=dirGitLoc) + p=subprocess.Popen(["git","rev-parse","--verify","HEAD"],cwd=dirGitLoc,stdout=subprocess.PIPE,stderr=subprocess.PIPE) p_out,p_err=p.communicate() if p.returncode != 0: msg = "Error in __getCurrentVersion\n" + p_err @@ -117,7 +117,7 @@ def __compileOldCommon(topSrcDir,pattern,config,envAcc,srcDir,topBuildDir,topIns return myInstallDir myCmd=[os.path.join(srcDir,"configure"),"--prefix=%s"%(myInstallDir)]+addCfgParam print "Command: ", " ".join(myCmd) - p=subprocess.Popen(myCmd,cwd=myBuildDir,env=computeEnv(envAcc)) + p=subprocess.Popen(myCmd,cwd=myBuildDir,env=computeEnv(envAcc),stdout=subprocess.PIPE,stderr=subprocess.PIPE) __compilePart1(p,myBuildDir) __compilePart2(topSrcDir,pattern,config,envAcc,myBuildDir,splitInstall) return myInstallDir @@ -134,7 +134,7 @@ def compileNew(topSrcDir,pattern,config,envAcc,srcDir,topBuildDir,topInstallDir, return myInstallDir myCmd=["cmake","-DCMAKE_INSTALL_PREFIX=%s"%(myInstallDir)]+addCfgParam+[srcDir] print(" ".join(myCmd)) - p=subprocess.Popen(myCmd,cwd=myBuildDir,env=computeEnv(envAcc)) + p=subprocess.Popen(myCmd,cwd=myBuildDir,env=computeEnv(envAcc),stdout=subprocess.PIPE,stderr=subprocess.PIPE) __compilePart1(p,myBuildDir) __compilePart2(topSrcDir,pattern,config,envAcc,myBuildDir,False) return myInstallDir -- 2.39.2