-
Notifications
You must be signed in to change notification settings - Fork 177
Handle pip package versions like pip does [rev2] #909
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
base: master
Are you sure you want to change the base?
Conversation
Signed-off-by: Joshua Whitley <[email protected]>
Signed-off-by: Martin Pecka <[email protected]>
Such packages will exist e.g. if you've sourced a colcon workspace that has built ament_python packages with --symlink-install. Of course they could exist for other valid reasons as well. For such packages, 'pip freeze' would output something like ``` # Editable install with no version control (examples-rclpy-executors==0.20.4) -e /home/daniel/ws/build/examples_rclpy_executors ``` Making the output unparsable. 'pip list --format freeze' otoh gives ``` examples-rclpy-executors==0.20.4 ``` Which is fine.
…pip-module-versions Resolving some merge conflicts in the process (which should be reviewed)
|
I came across ros/rosdistro#46946 (comment) which made me remember this issue. The linked comment talks about a con with adding custom rosdep entries:
My understanding is that this PR addresses this exact thing, and gives rosdep the ability to "(truly) support versioning" of pip packages. I made some commits on top of this branch a while back, mainly to resolve merge conflicts. I've been using it with custom rosdep keys targeting explicit pip package versions, and it's working well. https://github.com/danielcranston/rosdep/tree/handle-pip-module-versions. @peci1 mind having a look at the commits? If they seem good to you feel free to adopt them here. @emersonknapp do you have any thoughts on this? |
|
Thanks, I'll have a look. Not sure about the timeframe, though. |
Comparing to inequality with .* versions is not supported by pip: pypa/packaging#645 .
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #909 +/- ##
==========================================
- Coverage 74.22% 72.09% -2.14%
==========================================
Files 44 44
Lines 3376 3519 +143
Branches 0 696 +696
==========================================
+ Hits 2506 2537 +31
+ Misses 870 802 -68
- Partials 0 180 +180 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Thanks @danielcranston , I've integrated your changes. |
Continuation of #901.
This would come handy e.g. with package m2r added in ros/rosdistro#35827 , where the newest released version on pip is python3-only, but it is also offered on python2 pip on bionic.