import errno
import os
import os.path
-import popen2
import string
+import subprocess
import sys
import select
raise
def exec_popen3(l, env, stdout, stderr):
- proc = popen2.Popen3(string.join(l), 1)
- process_cmd_output(proc.fromchild, proc.childerr, stdout, stderr)
+ proc = subprocess.Popen(string.join(l),
+ stdout=stdout,
+ stderr=stderr,
+ shell=True)
stat = proc.wait()
if stat & 0xff:
return stat | 0x80
__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
import base64
-import md5
+import hashlib
import os.path
import pickle
import re
based on the MD5 signatures of the sln filename plus the name of
the project. It basically just needs to be unique, and not
change with each invocation."""
+ m = hashlib.md5()
+ m.update(str(slnfile) + str(name))
# TODO(1.5)
- #solution = _hexdigest(md5.new(str(slnfile)+str(name)).digest()).upper()
- solution = string.upper(_hexdigest(md5.new(str(slnfile)+str(name)).digest()))
+ #solution = m.hexdigest().upper()
+ solution = string.upper(_hexdigest(m.digest()))
# convert most of the signature to GUID form (discard the rest)
solution = "{" + solution[:8] + "-" + solution[8:12] + "-" + solution[12:16] + "-" + solution[16:20] + "-" + solution[20:32] + "}"
return solution
import os
import re
import shutil
-import popen2
+import subprocess
import SCons.Builder
import SCons.Node.FS
env.Prepend( RPMFLAGS = '--define \'_topdir %s\'' % tmpdir )
# now call rpmbuild to create the rpm package.
- handle = popen2.Popen3( get_cmd(source, env), capturestderr=1 )
- output = handle.fromchild.read()
- #output += handle.childerr.read()
- output = output + handle.childerr.read()
- status = handle.wait()
+ handle = subprocess.Popen(get_cmd(source, env),
+ stdout=subprocess.PIPE,
+ stderr=subprocess.STDOUT,
+ shell=True)
+ output = handle.stdout.read()
+ status = handle.wait()
if status:
raise SCons.Errors.BuildError( node=target[0],