From 2c787fe1fe58b00bfcea4cd8c294e90a944e7e81 Mon Sep 17 00:00:00 2001 From: Fangrui Song Date: Sun, 4 Feb 2018 11:01:02 -0800 Subject: [PATCH] [waf] Use str for Python 2 --- wscript | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wscript b/wscript index 462b8f9f..2483023e 100644 --- a/wscript +++ b/wscript @@ -238,9 +238,9 @@ def configure(ctx): # Use the detected clang executable to infer resource directory # Use `clang -### -xc /dev/null` instead of `clang -print-resource-dir` because the option is unavailable in 4.0.0 devnull = '/dev/null' if sys.platform != 'win32' else 'NUL' - output = subprocess.check_output( + output = str(subprocess.check_output( [clang, '-###', '-xc', devnull], - stderr=subprocess.STDOUT).decode() + stderr=subprocess.STDOUT).decode()) match = re.search(r'"-resource-dir" "([^"]*)"', output, re.M) if match: ctx.env.default_resource_directory = match.group(1)