summaryrefslogtreecommitdiffstats
path: root/scons
diff options
context:
space:
mode:
authorEric Engestrom <[email protected]>2017-09-19 13:56:34 +0100
committerEric Engestrom <[email protected]>2017-09-25 11:57:12 +0100
commit7d48219b3ac78895315ea6cef3ced3e55d3d92f0 (patch)
treea8eda30806669392696991393ed9db1cf4e26691 /scons
parent3f6a17a8fcdb891409794bb7925a6fb4947b54e1 (diff)
scons: use python3-compatible print()
These changes were generated using python's `2to3` tool. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=102852 Reported-by: Alex Granni <[email protected]> Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Jose Fonseca <[email protected]>
Diffstat (limited to 'scons')
-rwxr-xr-xscons/gallium.py22
-rw-r--r--scons/llvm.py16
2 files changed, 19 insertions, 19 deletions
diff --git a/scons/gallium.py b/scons/gallium.py
index 1e35ef434a3..e394bf8eabf 100755
--- a/scons/gallium.py
+++ b/scons/gallium.py
@@ -257,16 +257,16 @@ def generate(env):
# Backwards compatability with the debug= profile= options
if env['build'] == 'debug':
if not env['debug']:
- print 'scons: warning: debug option is deprecated and will be removed eventually; use instead'
- print
- print ' scons build=release'
- print
+ print('scons: warning: debug option is deprecated and will be removed eventually; use instead')
+ print('')
+ print(' scons build=release')
+ print('')
env['build'] = 'release'
if env['profile']:
- print 'scons: warning: profile option is deprecated and will be removed eventually; use instead'
- print
- print ' scons build=profile'
- print
+ print('scons: warning: profile option is deprecated and will be removed eventually; use instead')
+ print('')
+ print(' scons build=profile')
+ print('')
env['build'] = 'profile'
if False:
# Enforce SConscripts to use the new build variable
@@ -300,7 +300,7 @@ def generate(env):
env['build_dir'] = build_dir
env.SConsignFile(os.path.join(build_dir, '.sconsign'))
if 'SCONS_CACHE_DIR' in os.environ:
- print 'scons: Using build cache in %s.' % (os.environ['SCONS_CACHE_DIR'],)
+ print('scons: Using build cache in %s.' % (os.environ['SCONS_CACHE_DIR'],))
env.CacheDir(os.environ['SCONS_CACHE_DIR'])
env['CONFIGUREDIR'] = os.path.join(build_dir, 'conf')
env['CONFIGURELOG'] = os.path.join(os.path.abspath(build_dir), 'config.log')
@@ -385,8 +385,8 @@ def generate(env):
if env['embedded']:
cppdefines += ['PIPE_SUBSYSTEM_EMBEDDED']
if env['texture_float']:
- print 'warning: Floating-point textures enabled.'
- print 'warning: Please consult docs/patents.txt with your lawyer before building Mesa.'
+ print('warning: Floating-point textures enabled.')
+ print('warning: Please consult docs/patents.txt with your lawyer before building Mesa.')
cppdefines += ['TEXTURE_FLOAT_ENABLED']
env.Append(CPPDEFINES = cppdefines)
diff --git a/scons/llvm.py b/scons/llvm.py
index d6a21685df5..eaa2ecbe026 100644
--- a/scons/llvm.py
+++ b/scons/llvm.py
@@ -68,13 +68,13 @@ def generate(env):
if env['platform'] == 'windows':
# XXX: There is no llvm-config on Windows, so assume a standard layout
if llvm_dir is None:
- print 'scons: LLVM environment variable must be specified when building for windows'
+ print('scons: LLVM environment variable must be specified when building for windows')
return
# Try to determine the LLVM version from llvm/Config/config.h
llvm_config = os.path.join(llvm_dir, 'include/llvm/Config/llvm-config.h')
if not os.path.exists(llvm_config):
- print 'scons: could not find %s' % llvm_config
+ print('scons: could not find %s' % llvm_config)
return
llvm_version_major_re = re.compile(r'^#define LLVM_VERSION_MAJOR ([0-9]+)')
llvm_version_minor_re = re.compile(r'^#define LLVM_VERSION_MINOR ([0-9]+)')
@@ -92,10 +92,10 @@ def generate(env):
llvm_version = distutils.version.LooseVersion('%s.%s' % (llvm_version_major, llvm_version_minor))
if llvm_version is None:
- print 'scons: could not determine the LLVM version from %s' % llvm_config
+ print('scons: could not determine the LLVM version from %s' % llvm_config)
return
if llvm_version < distutils.version.LooseVersion(required_llvm_version):
- print 'scons: LLVM version %s found, but %s is required' % (llvm_version, required_llvm_version)
+ print('scons: LLVM version %s found, but %s is required' % (llvm_version, required_llvm_version))
return
env.Prepend(CPPPATH = [os.path.join(llvm_dir, 'include')])
@@ -231,14 +231,14 @@ def generate(env):
else:
llvm_config = os.environ.get('LLVM_CONFIG', 'llvm-config')
if not env.Detect(llvm_config):
- print 'scons: %s script not found' % llvm_config
+ print('scons: %s script not found' % llvm_config)
return
llvm_version = env.backtick('%s --version' % llvm_config).rstrip()
llvm_version = distutils.version.LooseVersion(llvm_version)
if llvm_version < distutils.version.LooseVersion(required_llvm_version):
- print 'scons: LLVM version %s found, but %s is required' % (llvm_version, required_llvm_version)
+ print('scons: LLVM version %s found, but %s is required' % (llvm_version, required_llvm_version))
return
try:
@@ -264,13 +264,13 @@ def generate(env):
env.ParseConfig('%s --system-libs' % llvm_config)
env.Append(CXXFLAGS = ['-std=c++11'])
except OSError:
- print 'scons: llvm-config version %s failed' % llvm_version
+ print('scons: llvm-config version %s failed' % llvm_version)
return
assert llvm_version is not None
env['llvm'] = True
- print 'scons: Found LLVM version %s' % llvm_version
+ print('scons: Found LLVM version %s' % llvm_version)
env['LLVM_VERSION'] = llvm_version
# Define HAVE_LLVM macro with the major/minor version number (e.g., 0x0206 for 2.6)