Fix travis builds for PIL.

This commit is contained in:
Bastian Kleineidam 2013-12-10 08:48:32 +01:00
parent bdf290f076
commit 06306f5b7e
3 changed files with 12 additions and 1 deletions

View file

@ -10,9 +10,13 @@ branches:
before_install:
- sudo apt-get update -qq
- sudo apt-get install -qq libjpeg-dev
- sudo ln -s /usr/lib/x86_64-linux-gnu/libjpeg.so /usr/lib
- sudo ln -s /usr/lib/x86_64-linux-gnu/libfreetype.so /usr/lib
- sudo ln -s /usr/lib/x86_64-linux-gnu/libz.so /usr/lib
# command to install dependencies
install:
- pip install -r requirements.txt --use-mirrors
- scripts/install_pil.sh
- pip install pytest-xdist --use-mirrors
# command to run tests
script: make test PYTESTOPTS="--tb=short -n10"

View file

@ -2,4 +2,3 @@
requests
# optional:
argcomplete
PIL

8
scripts/install_pil.sh Executable file
View file

@ -0,0 +1,8 @@
#!/bin/sh
# Install PIL in Travis CI environment for Python 2.x builds.
set -e
set -u
if python -c 'import sys; sys.exit(0 if sys.hexversion<0x03000000 else 1)'; then
pip install PIL
fi