Skip to content
Snippets Groups Projects
Commit 7deb9586 authored by Daniel Stonier's avatar Daniel Stonier
Browse files

message package reindexing code.

parent 7aa79461
No related branches found
No related tags found
No related merge requests found
...@@ -17,9 +17,11 @@ ...@@ -17,9 +17,11 @@
<build_depend>rospy</build_depend> <build_depend>rospy</build_depend>
<build_depend>java</build_depend> <build_depend>java</build_depend>
<build_depend>ant</build_depend> <build_depend>ant</build_depend>
<build_depend>rosinstall_generator</build_depend>
<run_depend>python-rospkg</run_depend> <run_depend>python-rospkg</run_depend>
<run_depend>rospy</run_depend> <run_depend>rospy</run_depend>
<run_depend>java</run_depend> <run_depend>java</run_depend>
<run_depend>ant</run_depend> <run_depend>ant</run_depend>
<run_depend>catkin</run_depend> <run_depend>catkin</run_depend>
<run_depend>rosinstall_generator</run_depend>
</package> </package>
...@@ -8,7 +8,7 @@ d = generate_distutils_setup( ...@@ -8,7 +8,7 @@ d = generate_distutils_setup(
package_dir={'': 'src'}, package_dir={'': 'src'},
scripts=['scripts/catkin_create_android_repo', scripts=['scripts/catkin_create_android_repo',
'scripts/catkin_create_android_pkg', 'scripts/catkin_create_android_pkg',
'scripts/catkin_create_android_library_pkg' 'scripts/catkin_create_android_library_pkg',
], ],
package_data = {'rosjava_build_tools': [ package_data = {'rosjava_build_tools': [
'templates/android_package/*', 'templates/android_package/*',
......
...@@ -12,3 +12,4 @@ import console ...@@ -12,3 +12,4 @@ import console
from init_repo import init_android_repo from init_repo import init_android_repo
from create_package import create_android_package from create_package import create_android_package
from utils import which from utils import which
from release import scrape_for_release_message_packages
#!/usr/bin/env python
#
# License: Apache 2.0
# https://raw.github.com/rosjava/rosjava_build_tools/license/LICENSE
#
##############################################################################
# Imports
##############################################################################
from rosinstall_generator.generator import ARG_ALL_PACKAGES, generate_rosinstall, sort_rosinstall
##############################################################################
# Imports
##############################################################################
def scrape_for_release_message_packages(track):
try:
# Should use ROS_DISTRO here, or some passed in value.
rosinstall_data = generate_rosinstall(track, [ARG_ALL_PACKAGES],
wet_only=True, dry_only=False
)
except RuntimeError as unused_e:
raise RuntimeError("error occured while scraping rosdistro for msg package naems and versions.")
rosinstall_data = sort_rosinstall(rosinstall_data)
#print("%s" % rosinstall_data)
packages = []
for element in rosinstall_data:
for unused_key, value in element.items():
if "_msgs" in value['local-name'] or "_srvs" in value['local-name']:
name = value['local-name']
# bloom version is usually of the form: 'release/hydro/zeroconf_msgs/0.2.1-0'
version = value['version'].split('/')[-1].split('-')[0]
pkg = {'name': name, 'version': version}
packages.append(pkg)
return packages
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment