[PATCH] D55183: [gn build] Use print_function in write_cmake_config.py

Phabricator via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 3 13:13:25 PST 2018


This revision was automatically updated to reflect the committed changes.
Closed by commit rL348190: [gn build] Use print_function in write_cmake_config.py (authored by nico, committed by ).

Changed prior to commit:
  https://reviews.llvm.org/D55183?vs=176301&id=176463#toc

Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D55183/new/

https://reviews.llvm.org/D55183

Files:
  llvm/trunk/utils/gn/build/write_cmake_config.py


Index: llvm/trunk/utils/gn/build/write_cmake_config.py
===================================================================
--- llvm/trunk/utils/gn/build/write_cmake_config.py
+++ llvm/trunk/utils/gn/build/write_cmake_config.py
@@ -32,6 +32,8 @@
 processing all values.
 """
 
+from __future__ import print_function
+
 import argparse
 import os
 import re
@@ -82,15 +84,15 @@
         out_lines.append(in_line)
 
     if unused_values:
-        print >>sys.stderr, 'Unused --values args:'
-        print >>sys.stderr, '    ', '\n    '.join(unused_values)
+        print('unused values args:', file=sys.stderr)
+        print('    ', '\n    '.join(unused_values), file=sys.stderr)
         return 1
 
     output = ''.join(out_lines)
 
     leftovers = var_re.findall(output)
     if leftovers:
-        print >>sys.stderr, 'unprocessed values:\n', '\n'.join(leftovers)
+        print('unprocessed values:\n', '\n'.join(leftovers), file=sys.stderr)
         return 1
 
     if not os.path.exists(args.output) or open(args.output).read() != output:


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D55183.176463.patch
Type: text/x-patch
Size: 1047 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20181203/66691e0e/attachment.bin>


More information about the llvm-commits mailing list