support version specific install for pip (and others)#694
support version specific install for pip (and others)#694k-okada wants to merge 6 commits intoros-infrastructure:masterfrom
Conversation
|
I'm not maintaining rosdep, nor using it much these days, but just some thoughts from when we had discussed this in the past:
You might argue to just leave all those decisions to pip, and that is probably a good idea if possible, but consider the following: I'm not 100% sure here, I believe rosdep tries to combine multiple packages to a single Ideally, the intended behaviour in such cases would be documented and tested. But maybe it's also ok to keep it simple if it covers >95% of use cases. You should probably wait for some feedback on willingness/bandwidth to include this change from a maintainer. |
9415aee to
604affe
Compare
Codecov Report
@@ Coverage Diff @@
## master #694 +/- ##
==========================================
+ Coverage 74.85% 75.16% +0.30%
==========================================
Files 41 41
Lines 3214 3277 +63
==========================================
+ Hits 2406 2463 +57
- Misses 808 814 +6
Continue to review full report at Codecov.
|
|
Just raising +1 flag for adding this capability to utilize package.xml being able to define version limitations. We've ended up running |
|
+1 for this PR, but I can understand @NikolausDemmel 's concern. |
…p, some package requries python3
…p, some package requries python3
…p, some package requries python3
…p, some package requries python3
…p, some package requries python3
…p, some package requries python3
In that case I think it would be okay to just pin the version in the rosdistro file because everybody on python2 will suffer from this. |
src/rosdep2/installers.py
Outdated
| return [] # Default return empty list | ||
|
|
||
| def resolve(self, rosdep_args_dict): | ||
| def resolve(self, rosdep, rosdep_args_dict): |
There was a problem hiding this comment.
Can you please move this argument to after the rosdep_args_dict and add a default value for it so it doesn't unnecessarily break other projects that rely on resolve?
There was a problem hiding this comment.
@russkel thanks for comment, this makes much simpler, fixed the code
| return resolutions_flat, errors | ||
|
|
||
| def resolve(self, rosdep_key, resource_name, installer_context): | ||
| def resolve(self, rosdep, resource_name, installer_context): |
There was a problem hiding this comment.
this is not new argument, just to rename variable name, since we have changed from list of keys to catkin_pkg.package.Dependency object
:param rosdep_key: rosdep key to resolve :param rosdeps: rosdep key (catkin_pkg.package.Dependency object) to resolve
|
Alternatively, could you store the Edit: disregard above comment. I investigated it and it wasn't that simple. |
Codecov Report
@@ Coverage Diff @@
## master #694 +/- ##
==========================================
+ Coverage 74.82% 75.16% +0.33%
==========================================
Files 44 41 -3
Lines 3360 3277 -83
==========================================
- Hits 2514 2463 -51
+ Misses 846 814 -32
Continue to review full report at Codecov.
|
…ep_args_dict adn add default value for backward compatibility
| print(lookup.get_rosdeps('stack1_p1')) | ||
| assert set([d.name for d in lookup.get_rosdeps('stack1_p1')]) == set(['stack1_dep1', 'stack1_p1_dep1', 'stack1_p1_dep2']) | ||
| assert set([d.name for d in lookup.get_rosdeps('stack1_p1', implicit=False)]) == set(['stack1_dep1', 'stack1_p1_dep1', 'stack1_p1_dep2']) | ||
| assert set({d.name for d in lookup.get_rosdeps('stack1_p1')}) == set(['stack1_dep1', 'stack1_p1_dep1', 'stack1_p1_dep2']) |
There was a problem hiding this comment.
Set comprehension doesn't need the outer set()
|
@k-okada Would you mind taking a look at my new draft #901 which covers a small portion of what you've done here but on the install-verification side? This at least allows you to specify |
We often have trouble on version problem of pip installed modules, and to avoid this it is very impotant to not to upgrade the python module version automatically (ofcourse do not use pip, is the best solution....)
This PR respect
version_eqor other attribute independtag when runningpip install