From c0ebe773cd0fb301474430205c69440f9915d5b0 Mon Sep 17 00:00:00 2001 From: Serge Guelton Date: Tue, 18 Dec 2018 08:36:33 +0000 Subject: Portable Python script across Python version Using from __future__ import print_function it is possible to have a compatible behavior of `print(...)` across Python version. Differential Revision: https://reviews.llvm.org/D55213 llvm-svn: 349454 --- clang/utils/check_cfc/setup.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'clang/utils/check_cfc/setup.py') diff --git a/clang/utils/check_cfc/setup.py b/clang/utils/check_cfc/setup.py index b5fc473639e..6005f6f4112 100644 --- a/clang/utils/check_cfc/setup.py +++ b/clang/utils/check_cfc/setup.py @@ -1,6 +1,7 @@ """For use on Windows. Run with: python.exe setup.py py2exe """ +from __future__ import print_function from distutils.core import setup try: import py2exe @@ -8,10 +9,10 @@ except ImportError: import platform import sys if platform.system() == 'Windows': - print "Could not find py2exe. Please install then run setup.py py2exe." + print("Could not find py2exe. Please install then run setup.py py2exe.") raise else: - print "setup.py only required on Windows." + print("setup.py only required on Windows.") sys.exit(1) setup( -- cgit v1.2.3