I have an app that is tested in travis-ci using py.test. The idea is that it will get pushed to travis-ci which downloads and installs the required modules in a lib
folder for GAE
to run properly. This is what my travis file looks like:
language: python sudo: false python: - '2.7'
cache:
- pip
addons:
apt:
packages:
- python-protobuf
before_install:
- openssl <credential stuff>
- pip install --upgrade pip
- mkdir -p lib
install:
- pip install -r requirements.txt -t lib/
script:
- PYTHONPATH="$(pwd):$(pwd)/lib:${PYTHONPATH}"
- export PYTHONPATH
- echo ${PYTHONPATH}
- pytest tests/
deploy:
provider: gae
...
<deploy stuff>
The problem is, when I run py.test it ignores the modules that were installed in the lib
folder. When I run the following in the test script:
import sys
sys.path.append("/home/travis/build/AndersenLab/CeNDR/lib/")
They still are not recognized. Further - if I run this:
import pip
print(pip.get_installed_distributions())
The modules in the lib folder are not being recognized. They can't be imported. Here is an example of the travis-ci results: https://travis-ci.org/AndersenLab/CeNDR/builds/176450179