mercredi 27 janvier 2016

How to make Travis CI to install Python dependencies declared in tests_require?

I have Python package with setup.py. It has regular dependencies declared in install_requires and development dependencies declared in tests_require, e.g. flake8.

I thought pip install -e . or running python setup.py test will also install my development dependencies and they'll be available. However, apparently they're not and I struggle to setup my Travis CI build right.

install:
  - "pip install -e ."
script:
  - "python setup.py test"
  - "flake8"

Build configured as above will fail, because flake8 will not be found as a valid command. I also tried to invoke flake8 from inside of the python setup.py test command (via subprocess), but also without success.

Also I hate the fact that flake8 can't be easily made integral part of the python setup.py test command, but that's another story.

Aucun commentaire:

Enregistrer un commentaire