#
######################################################################
import os
-import commands
+import subprocess
Import('env')
if with_ra and not with_ra_ibb :
# check 'raxmppl' library, if it doesn't exits, ask user to download it
if not os.path.exists('raxmpp'):
- print '''
+ print('''
*********************************** Error: ***********************************************
* Please download ra_xmpp as following :
* $ git clone https://gerrit.iotivity.org/gerrit/iotivity-xmpp extlibs/raxmpp/raxmpp
******************************************************************************************
- '''
+ ''')
Exit(1)
- print 'building with ra_xmpp'
+ print('building with ra_xmpp')
if env.get('RELEASE'):
- print src_dir
+ print(src_dir)
build_dir = os.path.join(src_dir, 'extlibs/raxmpp/raxmpp/out', target_os, target_arch, 'release/')
else:
build_dir = os.path.join(src_dir, 'extlibs/raxmpp/raxmpp/out/', target_os, target_arch, 'debug/')
os.chdir('raxmpp')
sconsflags = ' RELEASE=true' if env['RELEASE'] else ' RELEASE=false'
- foo=commands.getoutput('scons external' + sconsflags )
- print foo
- foo=commands.getoutput('scons' + sconsflags )
- print foo
+ foo=subprocess.getoutput('scons external' + sconsflags )
+ print(foo)
+ foo=subprocess.getoutput('scons' + sconsflags )
+ print(foo)
env.AppendUnique(CPPPATH = src_dir+'/extlibs/raxmpp/raxmpp/ra_xmpp/',
LIBPATH=build_dir,