Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007 import rosdistro
00008 import catkin_pkg
00009
00010
00011
00012
00013
00014
00015 def has_build_depend_on_message_generation(package):
00016 '''
00017 Checks for a build dependency on message generation to determine if
00018 that package contains msgs/srvs.
00019
00020 @param package : typical catkin package object
00021 @type catkin_pkg.Package
00022
00023 @return True if it is a package that contains msgs/srvs
00024 @rtype Bool
00025 '''
00026 return 'message_generation' in [d.name for d in package.build_depends]
00027
00028
00029 def scrape_for_release_message_packages(track):
00030 url = rosdistro.get_index_url()
00031 index = rosdistro.get_index(url)
00032 cache = rosdistro.get_release_cache(index, 'hydro')
00033 packages = []
00034 for package_name, package_string in cache.package_xmls.iteritems():
00035 package = catkin_pkg.package.parse_package_string(package_string)
00036
00037
00038 if has_build_depend_on_message_generation(package):
00039 packages.append({'name': package_name, 'version': package.version})
00040 return packages