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,stdout=subprocess.PIPE,stderr=subprocess.PIPE)
+ p=subprocess.Popen(["git","rev-parse","--verify","HEAD"],cwd=dirGitLoc)
p_out,p_err=p.communicate()
if p.returncode != 0:
msg = "Error in __getCurrentVersion\n" + p_err
print("make in %s"%(buildDir))
paraCompFlag = config["paraCompFlag"]
if not splitInstall:
- p=subprocess.Popen(["make",paraCompFlag,"install"],cwd=buildDir,env=computeEnv(envAcc),stdout=subprocess.PIPE,stderr=subprocess.PIPE)
+ p=subprocess.Popen(["make",paraCompFlag,"install"],cwd=buildDir,env=computeEnv(envAcc))
a,b=p.communicate()
f=file(os.path.join(buildDir,compOut),"w") ; f.write(a) ; f.flush()
f=file(os.path.join(buildDir,compErr),"w") ; f.write(b) ; f.flush()
msg = "Error in build step. See details in %s and %s\n"%(os.path.join(buildDir,compOut), os.path.join(buildDir,compErr))
raise Exception(msg)
else:
- p=subprocess.Popen(["make",paraCompFlag],cwd=buildDir,env=computeEnv(envAcc),stdout=subprocess.PIPE,stderr=subprocess.PIPE)
+ p=subprocess.Popen(["make",paraCompFlag],cwd=buildDir,env=computeEnv(envAcc))
a0,b0=p.communicate()
f=file(os.path.join(buildDir,compOut),"w") ; f.write(a0) ; f.flush()
f=file(os.path.join(buildDir,compErr),"w") ; f.write(b0) ; f.flush()
if p.returncode != 0:
msg = "Error in build step. See details in %s and %s\n"%(os.path.join(buildDir,compOut), os.path.join(buildDir,compErr))
raise Exception(msg)
- p=subprocess.Popen(["make",paraCompFlag,"install"],cwd=buildDir,env=computeEnv(envAcc),stdout=subprocess.PIPE,stderr=subprocess.PIPE)
+ p=subprocess.Popen(["make",paraCompFlag,"install"],cwd=buildDir,env=computeEnv(envAcc))
a1,b1=p.communicate()
f=file(os.path.join(buildDir,compOut),"w") ; f.write(a0+a1) ; f.flush()
f=file(os.path.join(buildDir,compErr),"w") ; f.write(b0+b1) ; f.flush()
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),stdout=subprocess.PIPE,stderr=subprocess.PIPE)
+ p=subprocess.Popen(myCmd,cwd=myBuildDir,env=computeEnv(envAcc))
__compilePart1(p,myBuildDir)
__compilePart2(topSrcDir,pattern,config,envAcc,myBuildDir,splitInstall)
return myInstallDir
return myInstallDir
myCmd=["cmake","-DCMAKE_INSTALL_PREFIX=%s"%(myInstallDir)]+addCfgParam+[srcDir]
print(" ".join(myCmd))
- p=subprocess.Popen(myCmd,cwd=myBuildDir,env=computeEnv(envAcc),stdout=subprocess.PIPE,stderr=subprocess.PIPE)
+ p=subprocess.Popen(myCmd,cwd=myBuildDir,env=computeEnv(envAcc))
__compilePart1(p,myBuildDir)
__compilePart2(topSrcDir,pattern,config,envAcc,myBuildDir,False)
return myInstallDir
if not os.path.exists(dirGitLoc):
print("Cloning %s..."%dirGitLoc)
def __connect():
- p=subprocess.Popen("GIT_SSL_NO_VERIFY=true git clone %s"%(gitLoc[0]), shell=True,stdout=subprocess.PIPE,stderr=subprocess.PIPE)
+ p=subprocess.Popen("GIT_SSL_NO_VERIFY=true git clone %s"%(gitLoc[0]), shell=True)
p_out,p_err=p.communicate()
return p.returncode, p_out, p_err
local_command = "git config "
local_command += "-f .gitmodules "
local_command += "submodule.%s.url %s" % (key, val)
- p=subprocess.Popen(local_command,cwd=dirGitLoc,shell=True,stdout=subprocess.PIPE,stderr=subprocess.PIPE)
+ p=subprocess.Popen(local_command,cwd=dirGitLoc,shell=True)
p.communicate()
else:
local_command = "git config "
local_command += "-f .gitmodules "
local_command += "submodule.%s.url %s" % (key, val)
- p=subprocess.Popen(local_command,cwd=dirGitLoc,shell=True,stdout=subprocess.PIPE,stderr=subprocess.PIPE)
+ p=subprocess.Popen(local_command,cwd=dirGitLoc,shell=True)
p.communicate()
# Fetch
print("Fetching %s..."%dirGitLoc)
assert(os.path.exists(os.path.join(dirGitLoc,".git")))
- p=subprocess.Popen(["git","fetch","--prune"],cwd=dirGitLoc,stdout=subprocess.PIPE,stderr=subprocess.PIPE)
+ p=subprocess.Popen(["git","fetch","--prune"],cwd=dirGitLoc)
p.communicate()
- p=subprocess.Popen(["git","fetch","--tags"],cwd=dirGitLoc,stdout=subprocess.PIPE,stderr=subprocess.PIPE)
+ p=subprocess.Popen(["git","fetch","--tags"],cwd=dirGitLoc)
p.communicate()
pass
pass
# Checkout
- p=subprocess.Popen(["git","checkout",gitLoc[1]],cwd=dirGitLoc,stdout=subprocess.PIPE,stderr=subprocess.PIPE)
+ p=subprocess.Popen(["git","checkout",gitLoc[1]],cwd=dirGitLoc)
p_out,p_err=p.communicate()
if p.returncode != 0:
msg = "Error in checkout\n" + p_err
# Init and Update submodules
if dirGitLoc in ["ParaView", "prerequisites-salome.paraview"]:
- p=subprocess.Popen(["git","submodule","update","--init","--recursive"],cwd=dirGitLoc,stdout=subprocess.PIPE,stderr=subprocess.PIPE)
+ p=subprocess.Popen(["git","submodule","update","--init","--recursive"],cwd=dirGitLoc)
p.communicate()
if p.returncode != 0:
msg = "Error in submodule update\n" + p_err
raise Exception(msg)
- p=subprocess.Popen(["git","checkout","--",".gitmodules"],cwd=dirGitLoc,stdout=subprocess.PIPE,stderr=subprocess.PIPE)
+ p=subprocess.Popen(["git","checkout","--",".gitmodules"],cwd=dirGitLoc)
p.communicate()
if p.returncode != 0:
msg = "Error in submodule update\n" + p_err