<s> """<STR_LIT>""" <EOL> from __future__ import print_function <EOL> import subprocess <EOL> from . main import _get_default_RosdepLookup <EOL> from . rospkg_loader import DEFAULT_VIEW_KEY <EOL> from . sources_list import get_sources_cache_dir <EOL> def call_pkg_config ( option , pkg_name ) : <EOL> try : <EOL> value = subprocess . check_output ( [ '<STR_LIT>' , option , pkg_name ] ) <EOL> return value . strip ( ) <EOL> except subprocess . CalledProcessError : <EOL> return None <EOL> def init_rospack_interface ( ) : <EOL> class Options ( object ) : <EOL> def __init__ ( self ) : <EOL> self . os_override = None <EOL> self . sources_cache_dir = get_sources_cache_dir ( ) <EOL> self . verbose = False <EOL> lookup = _get_default_RosdepLookup ( Options ( ) ) <EOL> return lookup . get_rosdep_view ( DEFAULT_VIEW_KEY ) <EOL> def is_view_empty ( view ) : <EOL> return len ( view . rosdep_defs ) == <NUM_LIT:0> <EOL> def is_ros_package ( view , rosdep_name ) : <EOL> return _ros_flag ( view , rosdep_name , True ) <EOL> def is_system_dependency ( view , rosdep_name ) : <EOL> return _ros_flag ( view , rosdep_name , False ) <EOL> def _ros_flag ( view , rosdep_name , value ) : <EOL> try : <EOL> d = view . lookup ( rosdep_name ) <EOL> except KeyError : <EOL> return False <EOL> ros_flag = '<STR_LIT>' in d . data . keys ( ) <EOL> return ros_flag == value </s>
