felixduvallet / ros-travis-integration

ROS package continuous integration using travis-CI
BSD 3-Clause "New" or "Revised" License
127 stars 45 forks source link

Fix CI script by manually setting PYTHONPATH #10

Closed felixduvallet closed 7 years ago

felixduvallet commented 7 years ago

During an ubuntu image upgrade on Travis' side (specifically from connie-trusty to sugilite-trusty, see here), the python binary is installed into /opt/python/2.7.13 and the python search path is updated accordingly.

However, since all ROS dependencies are installed by apt-get into /usr/lib/python2.7 , this commit adds that location to the PYTHONPATH environment variable to ensure that python is able to find all required packages installed via apt-get.

This addresses the issue where the Travis build failed due to an import error:

ImportError: "from catkin_pkg.package import parse_package" failed
No module named catkin_pkg.package

This package was indeed installed, just inside

/usr/lib/python2.7/dist-packages/catkin_pkg

Fixes #9