mirror of
https://github.com/Z3Prover/z3
synced 2025-04-08 02:15:19 +00:00
fix for string decoding in build scripts
This commit is contained in:
parent
2277a52d80
commit
639dfc4b30
|
@ -90,7 +90,12 @@ FPMATH="Default"
|
|||
FPMATH_FLAGS="-mfpmath=sse -msse -msse2"
|
||||
|
||||
def check_output(cmd):
|
||||
return (subprocess.Popen(cmd, stdout=subprocess.PIPE).communicate()[0]).decode(sys.stdout.encoding).rstrip('\r\n')
|
||||
out = subprocess.Popen(cmd, stdout=subprocess.PIPE).communicate()[0]
|
||||
if out != None:
|
||||
enc = sys.stdout.encoding
|
||||
if enc != None: out.decode(enc).rstrip('\r\n')
|
||||
else: out.rstrip('\r\n')
|
||||
else: ""
|
||||
|
||||
def git_hash():
|
||||
try:
|
||||
|
|
|
@ -96,7 +96,11 @@ if sys.version < '3':
|
|||
return s
|
||||
else:
|
||||
def _to_pystr(s):
|
||||
return s.decode(sys.stdout.encoding)
|
||||
if s != None:
|
||||
enc = sys.stdout.encoding
|
||||
if enc != None: s.decode(enc)
|
||||
else: s
|
||||
else: ""
|
||||
|
||||
def init(PATH):
|
||||
global _lib
|
||||
|
|
Loading…
Reference in a new issue