ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

bloom: Generate debian package with pip-only dependency?

asked 2019-01-25 11:48:55 -0500

peci1 gravatar image

Hi,

I've made a ROS package that has a pip-only dependency (moviepy). I already included this dependency into rosdistro, so rosdep can resolve it (python-moviepy-pip).

Now I'd like to release the package via bloom, but:

==> git-bloom-generate -y rosdebian --prefix release/indigo indigo -i 0 --os-name ubuntu
Generating source debs for the packages: ['movie_publisher']
Debian Incremental Version: 0
Debian Distributions: ['trusty']
Releasing for rosdistro: indigo

Pre-verifying Debian dependency keys...
Running 'rosdep update'...
Key 'python-moviepy-pip' resolved to '['moviepy']' with installer 'pip', which does not match the default installer 'apt'.
Failed to resolve python-moviepy-pip on ubuntu:trusty with: Error running generator: The Debian generator does not support dependencies which are installed with the 'pip' installer.
python-moviepy-pip is depended on by these packages: ['movie_publisher']
<== Failed

What are the options? Can I somehow release a deb-packaged version of the pip-only dependency? I've seen https://askubuntu.com/questions/32754... , but I don't know how to use with with the ROS build ecosystem.

I also saw https://answers.ros.org/question/2808... , but that was a test-only dependency, while I need the package as a run dependency.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
2

answered 2019-01-25 13:33:10 -0500

tfoote gravatar image

As is stated in the rosdep contributing guide " Native packages are strongly preferred. (They are required for packaging and have upgrade and conflict tracking.)"

As per the answer to the question you linked ot on Stackoverlfow https://askubuntu.com/a/508608 the right solution is to get that dependency packaged as a debian package.

Part of being in a distribution is coordinating with the existing dependencies and versions available.

It looks like there's been some interest in packaging it already: https://bugs.debian.org/cgi-bin/bugre... but I don't see any followups.

There are ways to embed it inside a ROS package but in general that's discouraged unless you want to take on the full maintenance of the package. In particular there's also other dependencies that appear to be unmet for the debian packaging which is where things get complicated.

edit flag offensive delete link more

Comments

So if I want to proceed, I have basically two ways? 1) become the package maintainer for Debian 2) become the package maintainer for a ROS-released deb package? hmm, none of these sounds really interesting to me, though I think 2) would be easier...

peci1 gravatar image peci1  ( 2019-01-25 13:51:03 -0500 )edit

Yeah, unfortunately somebody has to do the work to generate and maintain the package.

tfoote gravatar image tfoote  ( 2019-01-25 13:54:56 -0500 )edit

Okay, so I'll release the package as source-only...

peci1 gravatar image peci1  ( 2019-01-25 14:30:22 -0500 )edit
1

As a third option, consider how much of the functionality of your dependency you're using, and consider re-implementing just that functionality within your package, so that you don't need the dependency at all.

ahendrix gravatar image ahendrix  ( 2019-01-26 00:16:54 -0500 )edit

True, and you can also look for functional alteratives that are packaged.

tfoote gravatar image tfoote  ( 2019-01-26 00:29:01 -0500 )edit

I did that, and haven't found any packaged alternative that would nicely wrap ffmpeg so that you could get movie frames as numpy arrays. I know I could call ffmpeg myself and do all the stuff about "computing" the right CLI parameters, but that's exactly what I want to avoid, since it's not trivial.

peci1 gravatar image peci1  ( 2019-01-26 04:03:16 -0500 )edit
1

OpenCV python can read and write video files, and it's already available in rosdep: https://www.learnopencv.com/read-writ...

ahendrix gravatar image ahendrix  ( 2019-01-26 20:23:53 -0500 )edit

Nice, thanks! It makes sense that OpenCV can also read video files :) However, their interface seems to be much less versatile than moviepy. I ended up adding opencv as a fallback, removing moviepy dependency, and informing the user at runtime that he should install moviepy for better performance.

peci1 gravatar image peci1  ( 2019-01-27 22:05:40 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2019-01-25 11:48:55 -0500

Seen: 548 times

Last updated: Jan 25 '19