diff options
author | cclauss <cclauss@me.com> | 2019-07-05 18:39:16 +0200 |
---|---|---|
committer | Rich Trott <rtrott@gmail.com> | 2019-07-16 10:40:31 -0700 |
commit | 54fcb14467b59e82d6e24bf44803462226a5de4d (patch) | |
tree | 21aceef7b5250e29be01f01e6451892a1d191a4e /tools/gyp/pylib/gyp/generator/cmake.py | |
parent | 7032e59bb550adcb448b2d24877921e7f97e7399 (diff) | |
download | android-node-v8-54fcb14467b59e82d6e24bf44803462226a5de4d.tar.gz android-node-v8-54fcb14467b59e82d6e24bf44803462226a5de4d.tar.bz2 android-node-v8-54fcb14467b59e82d6e24bf44803462226a5de4d.zip |
gyp: cherrypick more Python3 changes from node-gyp
PR-URL: https://github.com/nodejs/node/pull/28563
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Diffstat (limited to 'tools/gyp/pylib/gyp/generator/cmake.py')
-rw-r--r-- | tools/gyp/pylib/gyp/generator/cmake.py | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/tools/gyp/pylib/gyp/generator/cmake.py b/tools/gyp/pylib/gyp/generator/cmake.py index a2b96291aa..74b0c715e3 100644 --- a/tools/gyp/pylib/gyp/generator/cmake.py +++ b/tools/gyp/pylib/gyp/generator/cmake.py @@ -28,6 +28,8 @@ not be able to find the header file directories described in the generated CMakeLists.txt file. """ +from __future__ import print_function + import multiprocessing import os import signal @@ -644,8 +646,8 @@ def WriteTarget(namer, qualified_target, target_dicts, build_dir, config_to_use, cmake_target_type = cmake_target_type_from_gyp_target_type.get(target_type) if cmake_target_type is None: - print ('Target %s has unknown target type %s, skipping.' % - ( target_name, target_type ) ) + print('Target %s has unknown target type %s, skipping.' % + ( target_name, target_type)) return SetVariable(output, 'TARGET', target_name) @@ -868,8 +870,8 @@ def WriteTarget(namer, qualified_target, target_dicts, build_dir, config_to_use, default_product_ext = generator_default_variables['SHARED_LIB_SUFFIX'] elif target_type != 'executable': - print ('ERROR: What output file should be generated?', - 'type', target_type, 'target', target_name) + print('ERROR: What output file should be generated?', + 'type', target_type, 'target', target_name) product_prefix = spec.get('product_prefix', default_product_prefix) product_name = spec.get('product_name', default_product_name) @@ -1207,11 +1209,11 @@ def PerformBuild(data, configurations, params): output_dir, config_name)) arguments = ['cmake', '-G', 'Ninja'] - print 'Generating [%s]: %s' % (config_name, arguments) + print('Generating [%s]: %s' % (config_name, arguments)) subprocess.check_call(arguments, cwd=build_dir) arguments = ['ninja', '-C', build_dir] - print 'Building [%s]: %s' % (config_name, arguments) + print('Building [%s]: %s' % (config_name, arguments)) subprocess.check_call(arguments) @@ -1239,7 +1241,7 @@ def GenerateOutput(target_list, target_dicts, data, params): arglists.append((target_list, target_dicts, data, params, config_name)) pool.map(CallGenerateOutputForConfig, arglists) - except KeyboardInterrupt, e: + except KeyboardInterrupt as e: pool.terminate() raise e else: |