From 3f92d17894bedf2da6aabe017004391b91a5e860 Mon Sep 17 00:00:00 2001 From: Michel Zou Date: Sat, 28 Sep 2019 08:53:38 +0200 Subject: scons: add py3 support SCons 3.1 has moved to python 3, requiring this fix to continue supporting scons builds. Closes: #944 Cc: mesa-stable@lists.freedesktop.org Acked-by: Eric Engestrom Tested-by: Eric Engestrom --- scons/gallium.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'scons/gallium.py') diff --git a/scons/gallium.py b/scons/gallium.py index 72d8604169e..9381f804a31 100755 --- a/scons/gallium.py +++ b/scons/gallium.py @@ -132,7 +132,7 @@ def check_cc(env, cc, expr, cpp_opt = '-E'): sys.stdout.write('Checking for %s ... ' % cc) source = tempfile.NamedTemporaryFile(suffix='.c', delete=False) - source.write('#if !(%s)\n#error\n#endif\n' % expr) + source.write(('#if !(%s)\n#error\n#endif\n' % expr).encode()) source.close() # sys.stderr.write('%r %s %s\n' % (env['CC'], cpp_opt, source.name)); -- cgit v1.2.3