-
Notifications
You must be signed in to change notification settings - Fork 171
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 support for downloading a python3 version of the rosdep database. #607
Conversation
Signed-off-by: Chris Lalancette <[email protected]>
Can you please add a description to this PR how this is expected to be used and what the pros/cons of this approach are. |
Signed-off-by: Chris Lalancette <[email protected]>
Codecov Report
@@ Coverage Diff @@
## master #607 +/- ##
=========================================
Coverage ? 75.31%
=========================================
Files ? 30
Lines ? 2892
Branches ? 0
=========================================
Hits ? 2178
Misses ? 714
Partials ? 0
Continue to review full report at Codecov.
|
I updated the description with more information. I'll probably add a few more things presently, but it is a start. |
Since the drawback of switching the rosdep database is significant I would like to see a comparison to alternative approaches (naming your proposed approach Currently we use a
Another alternative (named This approach would require some kind of "fallback" though in order to not require duplicating all rosdep keys for non-Python packages. How difficult would e.g. Also if we consider to switch to Python 3 by the Ubuntu release 20.04 it would be straight forward to use Python 3 packages from that Ubuntu distro forward (avoid any duplication). So the usefulness of any solution could be limited to the transition period. |
I'm going to answer the last question first:
We originally had 6 ideas:
During our discussion, there was a lot of support for idea 6 above, which this PR moves us towards (I'll note that this is also similar to Number 1, with the difference that in number 6,
The initial effort wouldn't be too hard; the complication is going to be the fallback mechanism you mentioned. I'll do a quick proof-of-concept to see what it would look like, then we can compare. It's unclear to me whether that solution is better than this one. It keeps all of the keys in one file, but it's going to be somewhat confusing for contributors to understand that |
Closing in favor of ros-infrastructure/rep#201 which decided on just adding |
What we do here is to add an alternate version of https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/sources.list.d/20-default.list, called https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/sources.list.d/20-default-py3.list . The
20-default.list
stays the same, while the20-default-py3.list
points to a yaml file calledpython3.yaml
(example). That version of the yaml file maps rosdep keys to their python3 equivalents.python3.yaml
is only used if theROS_PYTHON_VERSION
environment variable is set to3
, otherwise it defaults to using the standardpython.yaml
(in order to use Python 3 successfully, users must haveROS_PYTHON_VERSION
set to3
both duringsudo rosdep init
and duringrosdep update
).Doing it this way has a few different benefits and drawbacks.
Benefits:
ROS_PYTHON_VERSION
is not set and where it is set to2
.python.yaml
file.20-default.list
file to point to thepython3.yaml
file, and changeROS_PYTHON_VERSION
to be3
over in ros_environment.Drawbacks:
~/.ros/rosdep/sources.cache/*
/etc/ros/rosdep/sources.list.d/20-default.list
ROS_PYTHON_VERSION
to3
in their user account.ROS_PYTHON_VERSION
to3
in the root account.sudo rosdep init
rosdep update
<os>_python3
keys that are already in the existingpython.yaml
file (e.g. https://github.com/ros/rosdistro/blob/master/rosdep/python.yaml#L226)