how to install real python modules in dist-packages?

asked 2019-07-03 12:28:55 -0600

zacwitte gravatar image

updated 2019-07-03 13:58:54 -0600

I've followed this documentation on how to use and CMakeLists.txt to use python modules in a catkin package. It pretty much "works" but I've observed that it actually puts a fake into python2.7/dist-packages/my_package, which will modify my python path at runtime to include my module's src dir. This works OK for actually running the code, but static code analysis (eg. pylint) doesn't execute the code that changes the path and therefore can't find my modules.

I've noticed that other ROS python packages have the real python files in dist-packages so my question is how do I do that? I suspect that it has something to do with the catkin build type being Release, but I'm pretty sure my build script is already using RelWithDebInfo.

edit retag flag offensive close merge delete


What documentation are you following?

jayess gravatar image jayess  ( 2019-07-03 13:06:30 -0600 )edit
zacwitte gravatar image zacwitte  ( 2019-07-03 13:56:29 -0600 )edit

Afaik "real python files" will only be copied to an install space with catkin.

Either run catkin_make install or configure catkin build to also run the install phase of everything (catkin config --install).

gvdhoorn gravatar image gvdhoorn  ( 2019-07-03 15:12:17 -0600 )edit