libcoap_checkout_command = 'git clone ' + libcoap_repo_url + '.git extlibs/libcoap/libcoap --branch ' + libcoap_branch
if with_upstream_libcoap == '1':
- print '*** Checking for installation of libCoAP ***'
+ print('*** Checking for installation of libCoAP ***')
if not os.path.exists(libcoap_dir):
# If the libcoap zip file is not already present, download it
if not os.path.exists(libcoap_zip_file):
libcoap_zip = libcoap_zip_file
# Unzip libcoap
if libcoap_zip and not os.path.exists(os.path.join(libcoap_dir, 'configure')):
- print 'Unzipping libCoAP'
+ print('Unzipping libCoAP')
env.UnpackAll(libcoap_dir, libcoap_zip)
# Rename libcoap
libcoap_unzip_dir = os.path.join(src_dir, 'extlibs', 'libcoap', 'libcoap-' + libcoap_branch)
if os.path.exists(os.path.join(libcoap_unzip_dir)):
os.rename(libcoap_unzip_dir, libcoap_dir)
if not os.path.exists(os.path.join(libcoap_dir, 'README')):
- print '''
+ print('''
*********************************** Error: ****************************************
* Unable to download and unpack libcoap! *
* Please download libcoap using the following command: *
* *
''' + libcoap_checkout_command + '''
* *
-***********************************************************************************'''
+***********************************************************************************''')
Exit()
else:
- print '''
+ print('''
*********************************** Info: *****************************************
* Using FORKED copy of libCoap located in: *
* resource/csdk/connectivity/lib/libcoap-4.1.1 *
-***********************************************************************************'''
+***********************************************************************************''')
######################################################################
# Build libCoAP