From: Cédric Aguerre Date: Tue, 18 Oct 2016 16:57:49 +0000 (+0200) Subject: restore all subprocess pipes - need a verbose/quiet mode X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=cbdc0d56b4cf1cb968c5255b01be0a376c07b749;p=tools%2Fpvdeliv.git restore all subprocess pipes - need a verbose/quiet mode --- 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