#NEWLINE# def __init__( self , environment , kwargs ) : #NEWLINE# #INDENT# Dependency . __init__ ( self ) #NEWLINE# if ( WxDependency . wx_found is None ) : #NEWLINE# #INDENT# self . check_wxconfig ( ) #NEWLINE# #UNINDENT# if ( not WxDependency . wx_found ) : #NEWLINE# #INDENT# raise DependencyException ( 'Wx-config not found.' ) #NEWLINE# #UNINDENT# self . is_found = False #NEWLINE# p = subprocess . Popen ( [ self . wxc , '--version' ] , stdout = subprocess . PIPE , stderr = subprocess . PIPE ) #NEWLINE# out = p . communicate ( ) [ 0 ] #NEWLINE# if ( p . returncode != 0 ) : #NEWLINE# #INDENT# mlog . log ( 'Dependency wxwidgets found:' , mlog . red ( 'NO' ) ) #NEWLINE# self . cargs = [ ] #NEWLINE# self . libs = [ ] #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# self . modversion = out . decode ( ) . strip ( ) #NEWLINE# version_req = kwargs . get ( 'version' , None ) #NEWLINE# if ( version_req is not None ) : #NEWLINE# #INDENT# if ( not mesonlib . version_compare ( self . modversion , version_req ) ) : #NEWLINE# #INDENT# mlog . log ( ( 'Wxwidgets version %s does not fullfill requirement %s' % ( self . modversion , version_req ) ) ) #NEWLINE# return #NEWLINE# #UNINDENT# #UNINDENT# mlog . log ( 'Dependency wxwidgets found:' , mlog . green ( 'YES' ) ) #NEWLINE# self . is_found = True #NEWLINE# self . requested_modules = self . get_requested ( kwargs ) #NEWLINE# p = subprocess . Popen ( [ self . wxc , '--cxxflags' ] , stdout = subprocess . PIPE , stderr = subprocess . PIPE ) #NEWLINE# out = p . communicate ( ) [ 0 ] #NEWLINE# if ( p . returncode != 0 ) : #NEWLINE# #INDENT# raise DependencyException ( 'Could not generate cargs for wxwidgets.' ) #NEWLINE# #UNINDENT# self . cargs = out . decode ( ) . split ( ) #NEWLINE# p = subprocess . Popen ( ( [ self . wxc , '--libs' ] + self . requested_modules ) , stdout = subprocess . PIPE , stderr = subprocess . PIPE ) #NEWLINE# out = p . communicate ( ) [ 0 ] #NEWLINE# if ( p . returncode != 0 ) : #NEWLINE# #INDENT# raise DependencyException ( 'Could not generate libs for wxwidgets.' ) #NEWLINE# #UNINDENT# self . libs = out . decode ( ) . split ( )