Use Pillow if PIL is not found.

Try to fix the travis build error by replacing the PIL dependency.  And remove
the system pyexiv2 for travis as it is not used in the virtualenv.
This commit is contained in:
Simon
2013-02-15 18:12:23 +01:00
parent 8ddf2e8e05
commit 2c88a3e6c0
2 changed files with 7 additions and 2 deletions

View File

@@ -5,7 +5,7 @@ python:
before_install:
# Dependencies to build PIL
- sudo apt-get update -qq
- sudo apt-get install -qq python-pyexiv2 libfreetype6-dev libjpeg8-dev zlib1g-dev
- sudo apt-get install -qq libfreetype6-dev libjpeg8-dev zlib1g-dev
install:
- pip install nose unittest2 --use-mirrors
- pip install . --use-mirrors

View File

@@ -3,10 +3,15 @@
import sys
from setuptools import setup, find_packages
requires = ['PIL', 'jinja2', 'Markdown', 'clint']
requires = ['jinja2', 'Markdown', 'clint']
if sys.version_info < (2, 7):
requires.append('argparse')
try:
from PIL import Image, ImageOps # NOQA
except ImportError:
requires += ['Pillow']
entry_points = {
'console_scripts': ['sigal = sigal:main']
}