Fix build error with scons-4.4.0 version which is based on python3
[platform/upstream/iotivity.git] / build_common / android / SConscript
index 2de28b1..46f08d7 100644 (file)
@@ -24,25 +24,25 @@ if not env.get('ANDROID_HOME'):
 if env.get('ANDROID_NDK'):
        android_ndk = env.get('ANDROID_NDK')
 else:
-       print '''
+       print('''
 *************************************** Info **********************************
 *    Android NDK path isn't set, the default will be used. You can set        *
 * environment variable ANDROID_NDK or add it in command line as:              *
 *      # scons ANDROID_NDK=<path to android NDK> ...                          *
 *******************************************************************************
-'''
+''')
        android_ndk = os.path.join(env.get('SRC_DIR'), 'extlibs', 'android', 'ndk', 'android-ndk-r10d')
 
 if env.get('ANDROID_GRADLE'):
        android_gradle = env.get('ANDROID_GRADLE')
 else:
-       print '''
+       print('''
 *************************************** Info **********************************
 *    Android Gradle path isn't set, the default will be used. You can set     *
 * environment variable ANDROID_GRADLE or add it in command line as:           *
 *      # scons ANDROID_GRADLE=<path to android GRADLE> ...                    *
 *******************************************************************************
-'''
+''')
        android_gradle = os.path.join(env.get('SRC_DIR'), 'extlibs', 'android', 'gradle', 'gradle-2.2.1', 'bin', 'gradle')
 
 help_vars.Update(env)
@@ -84,12 +84,12 @@ if env['HOST_OS'] == 'win32':
                ndk_build_cmd += '.cmd'
 
 if not os.path.isfile(ndk_build_cmd):
-       print '''
+       print('''
 *************************************** Error *********************************
 *   It seems android ndk path is not set properly, please check if "%s"
 * is the root directory of android ndk.                                       *
 *******************************************************************************
-''' % android_ndk
+''' % android_ndk)
        Exit(1)
 
 # ANDROID_HOME build option
@@ -100,13 +100,13 @@ else:
         help_vars.Add(PathVariable('ANDROID_HOME', 'ANDROID SDK root directory', os.environ.get('ANDROID_HOME')))
         help_vars.Update(env)
         Help(help_vars.GenerateHelpText(env))
-        print '''
+        print('''
 *************************************** Info **********************************
 *   Environment variable ANDROID_HOME will use default value. To override     *
 * root directory of android sdk, please specify ANDROID_HOME as follows:      *
 *       scons ANDROID_HOME= <path to Android SDK>                             *
 *******************************************************************************
-'''
+''')
 
 target_arch = env.get('TARGET_ARCH')
 
@@ -127,12 +127,12 @@ else:
 if tc_ver != '':
        cmd.append('NDK_TOOLCHAIN_VERSION=' + tc_ver)
 else:
-       print '''
+       print('''
 *************************************** Warning *******************************
 *   To support C++11, the toolchain should be >= 4.7, please make sure your   *
 * android NDK is at least r8e!                                                *
 *******************************************************************************
-'''
+''')
 
 cmd.append('-n')