Skip to content
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

Installing catkin python package with pip dependencies as virtualenv #109

Open
asmodehn opened this issue Apr 14, 2017 · 5 comments
Open

Comments

@asmodehn
Copy link
Member

This issue is for discussion and gathering information regarding how we can install a python package hierarchy as one ROS package.

This would make deploying complex python framework on ROS much easier.

The target here is to be able to package the whole virtual environment as a ROS package, because OSRF deploys ROS software this way. When containers or other means of deploying ROS packages will emerge, we will adapt to it.

The best existing solution candidate I could find so far is dh_virtualenv

@k-okada FYI

@asmodehn
Copy link
Member Author

It looks like it already happened for fpm : jordansissel/fpm#697

@asmodehn
Copy link
Member Author

Note : we do not want to change our current catkin_pip_package for this, since it is already working and there are many packages released in ROS based on it.

But we might want another API, like catkin_pip_package_virtualenv, that would manage the install differently...

As far as I can see, we shouldn't need to change the way we handle devel space for this.

@k-okada
Copy link
Contributor

k-okada commented Feb 8, 2018

Hi @asmodehn

sorry for long silence, I have chance to back to this issue. see
k-okada@e82f666
for catkin_pip_package_virtualenv example

I am testing this with https://github.com/k-okada/gdown, using catkin_make and run python code from the python executable within virtualenv.

$ rosrun gdown python2
Python 2.7.12 (default, Nov 20 2017, 18:23:56) 
[GCC 5.4.0 20160609] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import gdown
>>> gdown
<module 'gdown' from '/home/k-okada/catkin_ws/ws_catkin_pip/src/gdown/gdown/__init__.pyc'>
>>> import pyros_setup
>>> pyros_setup
<module 'pyros_setup' from '/home/k-okada/catkin_ws/ws_catkin_pip/devel/share/gdown/catkin_pip_env/lib/python2.7/site-packages/pyros_setup/__init__.pyc'>

I'm not sure how we can use dh-virtualenv because that is happens in dpkg-buildpackage stage. Are you suggesting we should modify python-bloom to installing catkin python package with pip dependencies as virtualenv ?

@asmodehn
Copy link
Member Author

@k-okada recently, I was made aware of https://github.com/locusrobotics/catkin_virtualenv

I haven't tried it yet. If you do please let me know what you think about it. I dont know yet how it manages package releases...

I am wondering which approach makes more sense, or if there is a reason to keep both catkin_pip and catkin_virtualenv around...

Keeping pip compatibility for different versions in catkin_pip can be a little troublesome, mostly because I am not building a proper virtualenv, so I am not sure if it is worth to keep doing things the "custom" way as it is currently...

@k-okada
Copy link
Contributor

k-okada commented Feb 21, 2018

@asmodehn Thanks for info, I tried catkin_virtualenv in small example and seems ok for me. We'll test in more complex example and let you know the result.

Cc: @yuyu2172

k-okada added a commit to k-okada/catkin_pip_chainercv that referenced this issue Mar 9, 2018
As I commented on pyros-dev/catkin_pip#109 (comment), chanier_virtualenv seems better in terms of our requirement
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants