Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ROS_PYTHON_VERSION to dependency conditionals. #551

Merged
merged 5 commits into from
Oct 18, 2019
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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)
cottsay marked this conversation as resolved.
Show resolved Hide resolved

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


Expand Down
4 changes: 4 additions & 0 deletions bloom/rosdistro_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,10 @@ def get_distribution_type(distro):
return get_index().distributions[distro].get('distribution_type')


def get_python_version(distro):
return get_index().distributions[distro].get('python_version')


def get_most_recent(thing_name, repository, reference_distro):
reference_distro_type = get_distribution_type(reference_distro)
distros_with_entry = {}
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
'python-dateutil',
'PyYAML',
'rosdep >= 0.15.0',
'rosdistro >= 0.7.0',
'rosdistro >= 0.7.5',
'vcstools >= 0.1.22',
]

Expand Down
4 changes: 2 additions & 2 deletions stdeb.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[DEFAULT]
Depends: python-yaml, python-empy, python-argparse, python-rosdep (>= 0.15.0), python-rosdistro (>= 0.7.0), python-vcstools (>= 0.1.22), python-setuptools, python-catkin-pkg (>= 0.4.3)
Depends3: python3-yaml, python3-empy, python3-rosdep (>= 0.15.0), python3-rosdistro (>= 0.7.0), python3-vcstools (>= 0.1.22), python3-setuptools, python3-catkin-pkg (>= 0.4.3)
Depends: python-yaml, python-empy, python-argparse, python-rosdep (>= 0.15.0), python-rosdistro (>= 0.7.5), python-vcstools (>= 0.1.22), python-setuptools, python-catkin-pkg (>= 0.4.3)
Depends3: python3-yaml, python3-empy, python3-rosdep (>= 0.15.0), python3-rosdistro (>= 0.7.5), python3-vcstools (>= 0.1.22), python3-setuptools, python3-catkin-pkg (>= 0.4.3)
Conflicts: python3-bloom
Conflicts3: python-bloom
Copyright-File: LICENSE.txt
Expand Down