def filtered_glob(env, pattern, omit=[],
ondisk=True, source=False, strings=False):
- return filter(
- lambda f: os.path.basename(f.path) not in omit,
- env.Glob(pattern))
+ return [f for f in env.Glob(pattern) if os.path.basename(f.path) not in omit]
env.AddMethod(filtered_glob, "FilteredGlob");
if int(containerJavaSupport):
try:
- print 'Java Home: ', os.environ['JAVA_HOME']
- print 'Java Lib: ', os.environ['JAVA_LIB']
+ print('Java Home: ', os.environ['JAVA_HOME'])
+ print('Java Lib: ', os.environ['JAVA_LIB'])
resource_container_env.Append(CPPDEFINES={'JAVA_SUPPORT':1})
except KeyError:
- print '''
+ print('''
*********************************** Error *************************************
* Building resource container without Java support. JAVA_HOME or JAVA_LIB are not set properly
* Please configure JAVA_HOME to point to your Java 7 JDK and
* Example: export JAVA_HOME=/usr/lib/jvm/java-7-openjdk-i386
* export JAVA_LIB=/usr/lib/jvm/java-7-openjdk-i386/jre/lib/i386/server
*******************************************************************************
- '''
+ ''')
resource_container_env.Append(CPPDEFINES={'JAVA_SUPPORT':0})
os.environ['JAVA_HOME']+'/include/linux'
])
except KeyError:
- print ''
+ print('')
if target_os not in ['windows']:
try:
resource_container_env.AppendUnique(LIBPATH = [os.environ['JAVA_LIB']])
except KeyError:
- print ''
+ print('')
resource_container_env.PrependUnique(LIBS = ['coap'])
resource_container_env.AppendUnique(LIBS = ['connectivity_abstraction'])
if int(containerJavaSupport):
try:
- print 'Java Lib: ', os.environ['JAVA_LIB']
+ print('Java Lib: ', os.environ['JAVA_LIB'])
resource_container_env.AppendUnique(LIBS = ['jvm'])
except KeyError:
- print ''
+ print('')
######################################################################
# Source files and Targets
conf2 = Configure(lib_env)
if not conf2.CheckLib('curl'):
- print '''X
+ print('''X
*********************************** Error *************************************
* Cannot build hue sample. Please install libcurl.
* Example (Ubuntu):
* Hint: check with pkg-config --libs libcurl and clear scons cache.
* Skipping hue sample build.
*******************************************************************************
- '''
+ ''')
else:
hue_resource_bundle_env = resource_container_env.Clone()
hue_resource_bundle_env.AppendUnique(CCFLAGS = ['-fPIC'])