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 10, 2019
1 parent 8dd49e1 commit 5674db0
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 @@ -41,6 +41,7 @@
from bloom.logging import info

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

from bloom.util import code
from bloom.util import maybe_continue
Expand Down Expand Up @@ -128,9 +129,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 5674db0

Please sign in to comment.