Since #93 got merged, it seems that Travis CI is failing with
======================================================================
ERROR: Failure: ImportError (No module named pycodestyle)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/travis/virtualenv/python2.7.17/lib/python2.7/site-packages/nose/loader.py", line 418, in loadTestsFromName
addr.filename, addr.module)
File "/home/travis/virtualenv/python2.7.17/lib/python2.7/site-packages/nose/importer.py", line 47, in importFromPath
return self.importFromDir(dir_path, fqname)
File "/home/travis/virtualenv/python2.7.17/lib/python2.7/site-packages/nose/importer.py", line 94, in importFromDir
mod = load_module(part_fqname, fh, filename, desc)
File "/tmp/capabilities_build/src/capabilities/test/unit/test_code_quality.py", line 1, in <module>
import pycodestyle
ImportError: No module named pycodestyle
Since #93 got merged, it seems that Travis CI is failing with
e.g. https://travis-ci.org/github/osrf/capabilities/builds/681663229
The
package.xml
defines a rosdep on python-pycodestyle: https://github.com/osrf/capabilities/blob/df54fa8c70103cd5c05c2f1b6839abcf29d8b0dc/package.xml#L44-L45.travis.yml
installs other python rosdeps via pip but notpycodestyle
: https://github.com/osrf/capabilities/blob/df54fa8c70103cd5c05c2f1b6839abcf29d8b0dc/.travis.yml#L6-L14I think
python-pycodestyle
might not be installed automatically during therosdep install
becauseROS_PYTHON_VERSION
is not set yet at this point.Solution A: Add pycodestyle to line 7 in
travis.yml
Solution B: Set
ROS_PYTHON_VERSION=2
before line 14 intravis.yml
(and cleanup line 7: remove the packages that are installed via rosdep)If B works I think it would be the better solution.