Skip to content

Commit

Permalink
Add ROS_PYTHON_VERSION to conditional context.
Browse files Browse the repository at this point in the history
  • Loading branch information
nuclearsandwich committed Oct 11, 2019
1 parent 78aa1cd commit fb19df8
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions bloom/generators/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@

from bloom.rosdistro_api import get_distribution_type
from bloom.rosdistro_api import get_index
from bloom.rosdistro_api import get_python_version

from bloom.util import code
from bloom.util import maybe_continue
Expand Down Expand Up @@ -139,9 +140,19 @@ def package_conditional_context(ros_distro):
else:
error("Bloom cannot cope with distribution_type '{0}'".format(
distribution_type), exit=True)
python_version = get_python_version(ros_distro)
if python_version == 2:
ros_python_version = '2'
elif python_version == 3:
ros_python_version = '3'
else:
error("Bloom cannot cope with python_version '{0}'".format(
python_version), exit=True)

return {
'ROS_VERSION': ros_version,
'ROS_DISTRO': ros_distro,
'ROS_PYTHON_VERSION': ros_python_version,
}


Expand Down

0 comments on commit fb19df8

Please sign in to comment.