-
Notifications
You must be signed in to change notification settings - Fork 170
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
support version specific install for pip (and others) #694
base: master
Are you sure you want to change the base?
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
@@ -278,8 +278,9 @@ def get_depends(self, rosdep_args): | |||
""" | |||
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@russkel thanks for comment, this makes much simpler, fixed the code
@@ -433,13 +438,13 @@ def resolve_all(self, resources, installer_context, implicit=False): | |||
|
|||
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ditto.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep understood.
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
@@ -343,26 +343,26 @@ def test_RosdepLookup_get_rosdeps(): | |||
pass | |||
|
|||
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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_eq
or other attribute independ
tag when runningpip install