Merge of travis-tweaks into jpeg2k

This commit is contained in:
wiredfool 2014-03-27 20:36:15 -07:00
commit 7a8025b947
7 changed files with 58 additions and 4 deletions

5
.gitignore vendored
View File

@ -8,3 +8,8 @@ docs/_build
# Vim cruft
.*.swp
#emacs
*~
\#*#
.#*

View File

@ -4,6 +4,9 @@ language: python
virtualenv:
system_site_packages: true
notifications:
irc: "chat.freenode.net#pil"
python:
- 2.6
- 2.7
@ -12,10 +15,14 @@ python:
- "pypy"
install:
- "sudo apt-get -qq install libfreetype6-dev liblcms2-dev libwebp-dev python-qt4 ghostscript libffi-dev"
- "sudo apt-get -qq install libfreetype6-dev liblcms2-dev python-qt4 ghostscript libffi-dev cmake"
- "pip install cffi"
- "sudo apt-get install python-tk"
# webp
- pushd depends && ./install_webp.sh && popd
# openjpeg
- pushd depends && ./install_openjpeg.sh && popd
script:
- python setup.py clean

View File

@ -2,6 +2,11 @@ from tester import *
from PIL import Image
if hasattr(sys, 'pypy_version_info'):
# This takes _forever_ on pypy. Open Bug,
# see https://github.com/python-imaging/Pillow/issues/484
skip()
def test_sanity():
im = lena()

View File

@ -3,7 +3,7 @@ from tester import *
from PIL import Image
try:
from PIL import ImageTk
except ImportError as v:
except (OSError, ImportError) as v:
skip(v)
success()

18
depends/install_openjpeg.sh Executable file
View File

@ -0,0 +1,18 @@
#!/bin/bash
# install openjpeg
if [ ! -f openjpeg-2.0.0.tar.gz ]; then
wget 'https://openjpeg.googlecode.com/files/openjpeg-2.0.0.tar.gz'
fi
rm -r openjpeg-2.0.0
tar -xvzf openjpeg-2.0.0.tar.gz
pushd openjpeg-2.0.0
cmake -DCMAKE_INSTALL_PREFIX=/usr . && make && sudo make install
popd

18
depends/install_webp.sh Executable file
View File

@ -0,0 +1,18 @@
#!/bin/bash
# install webp
if [ ! -f libwebp-0.4.0.tar.gz ]; then
wget 'https://webp.googlecode.com/files/libwebp-0.4.0.tar.gz'
fi
rm -r libwebp-0.4.0
tar -xvzf libwebp-0.4.0.tar.gz
pushd libwebp-0.4.0
./configure --prefix=/usr --enable-libwebpmux --enable-libwebpdemux && make && sudo make install
popd

View File

@ -81,7 +81,8 @@ def _read(file):
try:
import _tkinter
except ImportError:
except (ImportError, OSError):
# pypy emits an oserror
_tkinter = None