From edc3215e3454829e2f5741bcec831117a8643ea5 Mon Sep 17 00:00:00 2001 From: wiredfool Date: Wed, 26 Mar 2014 09:12:51 -0700 Subject: [PATCH 01/15] Disabling poor performing test on pypy --- Tests/test_image_point.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Tests/test_image_point.py b/Tests/test_image_point.py index c70556f6a..34233f80e 100644 --- a/Tests/test_image_point.py +++ b/Tests/test_image_point.py @@ -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() From d97244181d9648c9e5273735508388ea4f827af1 Mon Sep 17 00:00:00 2001 From: wiredfool Date: Wed, 26 Mar 2014 09:13:49 -0700 Subject: [PATCH 02/15] Adding current webp dependency to travis --- .travis.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index fc7b5e6a5..85c0e0704 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,10 +12,15 @@ 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" - "pip install cffi" + # enables pypy to compile - "sudo apt-get install python-tk" + # webp UNDONE -- refactor + - "wget 'https://webp.googlecode.com/files/libwebp-0.4.0.tar.gz' -O /tmp/libwebp-0.4.0.tar.gz" + - "tar -C /tmp -xvzf /tmp/libwebp-0.4.0.tar.gz" + - "cd /tmp/libwebp-0.4.0 && ./configure --enable-libwebpmux --enable-libwebpdemux && make && sudo make install" script: - python setup.py clean From c4cedd50eb92d0d918f2c5d01cbb4b84890ca952 Mon Sep 17 00:00:00 2001 From: wiredfool Date: Wed, 26 Mar 2014 09:29:47 -0700 Subject: [PATCH 03/15] Leave CWD in the right place --- .travis.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 85c0e0704..2fcf8bca4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -20,7 +20,9 @@ install: # webp UNDONE -- refactor - "wget 'https://webp.googlecode.com/files/libwebp-0.4.0.tar.gz' -O /tmp/libwebp-0.4.0.tar.gz" - "tar -C /tmp -xvzf /tmp/libwebp-0.4.0.tar.gz" - - "cd /tmp/libwebp-0.4.0 && ./configure --enable-libwebpmux --enable-libwebpdemux && make && sudo make install" + - "pushd /tmp/libwebp-0.4.0 && ./configure --enable-libwebpmux --enable-libwebpdemux && make && sudo make install && popd" + + script: - python setup.py clean From b97d220b2c702567cac21311223bb3bee6bbda5f Mon Sep 17 00:00:00 2001 From: wiredfool Date: Wed, 26 Mar 2014 09:53:45 -0700 Subject: [PATCH 04/15] Set prefix to not require ld preload on travis --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 2fcf8bca4..f3d82dfee 100644 --- a/.travis.yml +++ b/.travis.yml @@ -20,7 +20,7 @@ install: # webp UNDONE -- refactor - "wget 'https://webp.googlecode.com/files/libwebp-0.4.0.tar.gz' -O /tmp/libwebp-0.4.0.tar.gz" - "tar -C /tmp -xvzf /tmp/libwebp-0.4.0.tar.gz" - - "pushd /tmp/libwebp-0.4.0 && ./configure --enable-libwebpmux --enable-libwebpdemux && make && sudo make install && popd" + - "pushd /tmp/libwebp-0.4.0 && ./configure --prefix=/usr --enable-libwebpmux --enable-libwebpdemux && make && sudo make install && popd" From e0d42d0e027532209e18b50864649389fdb584df Mon Sep 17 00:00:00 2001 From: wiredfool Date: Wed, 26 Mar 2014 09:54:22 -0700 Subject: [PATCH 05/15] Speed this up for now --- .travis.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.travis.yml b/.travis.yml index f3d82dfee..24d0ad23f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,17 +5,17 @@ virtualenv: system_site_packages: true python: - - 2.6 +# - 2.6 - 2.7 - - 3.2 - - 3.3 - - "pypy" +# - 3.2 +# - 3.3 +# - "pypy" install: - "sudo apt-get -qq install libfreetype6-dev liblcms2-dev python-qt4 ghostscript libffi-dev" - "pip install cffi" # enables pypy to compile - - "sudo apt-get install python-tk" + # - "sudo apt-get install python-tk" # webp UNDONE -- refactor - "wget 'https://webp.googlecode.com/files/libwebp-0.4.0.tar.gz' -O /tmp/libwebp-0.4.0.tar.gz" @@ -30,6 +30,6 @@ script: - python selftest.py - python Tests/run.py -matrix: - allow_failures: - - python: "pypy" +#matrix: +# allow_failures: +# - python: "pypy" From 89507d16e35f70b607a28e6b55d7a02975546694 Mon Sep 17 00:00:00 2001 From: wiredfool Date: Wed, 26 Mar 2014 10:49:48 -0700 Subject: [PATCH 06/15] added jpeg2k build --- .travis.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 24d0ad23f..2bf671dbe 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,7 +12,7 @@ python: # - "pypy" install: - - "sudo apt-get -qq install libfreetype6-dev liblcms2-dev python-qt4 ghostscript libffi-dev" + - "sudo apt-get -qq install libfreetype6-dev liblcms2-dev python-qt4 ghostscript libffi-dev cmake" - "pip install cffi" # enables pypy to compile # - "sudo apt-get install python-tk" @@ -22,7 +22,9 @@ install: - "tar -C /tmp -xvzf /tmp/libwebp-0.4.0.tar.gz" - "pushd /tmp/libwebp-0.4.0 && ./configure --prefix=/usr --enable-libwebpmux --enable-libwebpdemux && make && sudo make install && popd" - + - "wget 'https://openjpeg.googlecode.com/files/openjpeg-2.0.0.tar.gz' -O /tmp/openjpeg-2.0.0.tar.gz" + - "tar -C /tmp -xvzf /tmp/openjpeg-2.0.0.tar.gz" + - "pushd /tmp/openjpeg-2.0.0 && cmake . && make && sudo DESTDIR=/usr make install && popd" script: - python setup.py clean From 9e5d597b4d7d70e1b161b29472a1f688f984d7ab Mon Sep 17 00:00:00 2001 From: wiredfool Date: Wed, 26 Mar 2014 11:31:06 -0700 Subject: [PATCH 07/15] use cmake to set prefix, instead of DESTDIR env variable --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 2bf671dbe..df423844b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -24,7 +24,7 @@ install: - "wget 'https://openjpeg.googlecode.com/files/openjpeg-2.0.0.tar.gz' -O /tmp/openjpeg-2.0.0.tar.gz" - "tar -C /tmp -xvzf /tmp/openjpeg-2.0.0.tar.gz" - - "pushd /tmp/openjpeg-2.0.0 && cmake . && make && sudo DESTDIR=/usr make install && popd" + - "pushd /tmp/openjpeg-2.0.0 && cmake -DCMAKE_INSTALL_PREFIX=/usr . && make && sudo make install && popd" script: - python setup.py clean From 7e80ce9ce049dafbb558d95664f5d796350395f7 Mon Sep 17 00:00:00 2001 From: wiredfool Date: Wed, 26 Mar 2014 12:04:54 -0700 Subject: [PATCH 08/15] Reenabling, timing --- .travis.yml | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/.travis.yml b/.travis.yml index df423844b..28b9cbf24 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,12 +4,15 @@ language: python virtualenv: system_site_packages: true +notifications: + irc: "chat.freenode.net#pil" + python: -# - 2.6 + - 2.6 - 2.7 -# - 3.2 -# - 3.3 -# - "pypy" + - 3.2 + - 3.3 + - "pypy" install: - "sudo apt-get -qq install libfreetype6-dev liblcms2-dev python-qt4 ghostscript libffi-dev cmake" @@ -18,13 +21,19 @@ install: # - "sudo apt-get install python-tk" # webp UNDONE -- refactor + - date - "wget 'https://webp.googlecode.com/files/libwebp-0.4.0.tar.gz' -O /tmp/libwebp-0.4.0.tar.gz" + - date - "tar -C /tmp -xvzf /tmp/libwebp-0.4.0.tar.gz" - "pushd /tmp/libwebp-0.4.0 && ./configure --prefix=/usr --enable-libwebpmux --enable-libwebpdemux && make && sudo make install && popd" + - date + # openjpeg - "wget 'https://openjpeg.googlecode.com/files/openjpeg-2.0.0.tar.gz' -O /tmp/openjpeg-2.0.0.tar.gz" - "tar -C /tmp -xvzf /tmp/openjpeg-2.0.0.tar.gz" + - date - "pushd /tmp/openjpeg-2.0.0 && cmake -DCMAKE_INSTALL_PREFIX=/usr . && make && sudo make install && popd" + - date script: - python setup.py clean @@ -32,6 +41,6 @@ script: - python selftest.py - python Tests/run.py -#matrix: -# allow_failures: -# - python: "pypy" +matrix: + allow_failures: + - python: "pypy" From d4ecef390fc2b2b4c0b5ff6a31e072b546f14f68 Mon Sep 17 00:00:00 2001 From: wiredfool Date: Wed, 26 Mar 2014 13:12:20 -0700 Subject: [PATCH 09/15] Try catching the tk error in pypy --- setup.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/setup.py b/setup.py index a8ff2e762..aa9238383 100644 --- a/setup.py +++ b/setup.py @@ -80,7 +80,8 @@ def _read(file): try: import _tkinter -except ImportError: +except (ImportError, OSError): + # pypy emits an oserror _tkinter = None From 31b84f41bca0dc35efcdb18fcceeb15be02163f2 Mon Sep 17 00:00:00 2001 From: wiredfool Date: Wed, 26 Mar 2014 13:22:37 -0700 Subject: [PATCH 10/15] refactored out dependencies --- .travis.yml | 15 +++------------ depends/install_openjpeg.sh | 18 ++++++++++++++++++ depends/install_webp.sh | 18 ++++++++++++++++++ 3 files changed, 39 insertions(+), 12 deletions(-) create mode 100755 depends/install_openjpeg.sh create mode 100755 depends/install_webp.sh diff --git a/.travis.yml b/.travis.yml index 28b9cbf24..9c0d2fb28 100644 --- a/.travis.yml +++ b/.travis.yml @@ -20,20 +20,11 @@ install: # enables pypy to compile # - "sudo apt-get install python-tk" - # webp UNDONE -- refactor - - date - - "wget 'https://webp.googlecode.com/files/libwebp-0.4.0.tar.gz' -O /tmp/libwebp-0.4.0.tar.gz" - - date - - "tar -C /tmp -xvzf /tmp/libwebp-0.4.0.tar.gz" - - "pushd /tmp/libwebp-0.4.0 && ./configure --prefix=/usr --enable-libwebpmux --enable-libwebpdemux && make && sudo make install && popd" - - date + # webp + - pushd depends && ./install_web[.sh && popd # openjpeg - - "wget 'https://openjpeg.googlecode.com/files/openjpeg-2.0.0.tar.gz' -O /tmp/openjpeg-2.0.0.tar.gz" - - "tar -C /tmp -xvzf /tmp/openjpeg-2.0.0.tar.gz" - - date - - "pushd /tmp/openjpeg-2.0.0 && cmake -DCMAKE_INSTALL_PREFIX=/usr . && make && sudo make install && popd" - - date + - pushd depends && ./install_openjpeg.sh && popd script: - python setup.py clean diff --git a/depends/install_openjpeg.sh b/depends/install_openjpeg.sh new file mode 100755 index 000000000..bd6b83e3b --- /dev/null +++ b/depends/install_openjpeg.sh @@ -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 + diff --git a/depends/install_webp.sh b/depends/install_webp.sh new file mode 100755 index 000000000..5f5963712 --- /dev/null +++ b/depends/install_webp.sh @@ -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 + From 6e8c8bf9d49e6e7583d3d4db63e7dd4fbd0d2277 Mon Sep 17 00:00:00 2001 From: wiredfool Date: Wed, 26 Mar 2014 13:28:03 -0700 Subject: [PATCH 11/15] Emacs cruft in .gitignore [ci skip] --- .gitignore | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.gitignore b/.gitignore index 0a642e562..f16a1f9a8 100644 --- a/.gitignore +++ b/.gitignore @@ -8,3 +8,8 @@ docs/_build # Vim cruft .*.swp + +#emacs +*~ +\#*# +.#* From 55ea6c01b1975f77dff9252c68f45849e18822bb Mon Sep 17 00:00:00 2001 From: wiredfool Date: Wed, 26 Mar 2014 13:31:20 -0700 Subject: [PATCH 12/15] OSError catching in the test as well --- Tests/test_imagetk.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Tests/test_imagetk.py b/Tests/test_imagetk.py index 5c39c9283..b30971e8f 100644 --- a/Tests/test_imagetk.py +++ b/Tests/test_imagetk.py @@ -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() From b91326b19505a27a963fed8b6fcc336f49d5ff5e Mon Sep 17 00:00:00 2001 From: wiredfool Date: Wed, 26 Mar 2014 13:46:00 -0700 Subject: [PATCH 13/15] Tpyo in script path --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 9c0d2fb28..aeba15d44 100644 --- a/.travis.yml +++ b/.travis.yml @@ -21,7 +21,7 @@ install: # - "sudo apt-get install python-tk" # webp - - pushd depends && ./install_web[.sh && popd + - pushd depends && ./install_web.sh && popd # openjpeg - pushd depends && ./install_openjpeg.sh && popd From 8ffcf97070953be991ee6730236593c864e7ba28 Mon Sep 17 00:00:00 2001 From: wiredfool Date: Wed, 26 Mar 2014 14:11:41 -0700 Subject: [PATCH 14/15] Correct resolution of typo --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index aeba15d44..bbff6391b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -21,7 +21,7 @@ install: # - "sudo apt-get install python-tk" # webp - - pushd depends && ./install_web.sh && popd + - pushd depends && ./install_webp.sh && popd # openjpeg - pushd depends && ./install_openjpeg.sh && popd From 33dda2ef613d27898015e1a55fccaed4cb50f5c8 Mon Sep 17 00:00:00 2001 From: wiredfool Date: Wed, 26 Mar 2014 14:37:38 -0700 Subject: [PATCH 15/15] Removing python-tk install [skip ci] --- .travis.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index bbff6391b..d68de0b32 100644 --- a/.travis.yml +++ b/.travis.yml @@ -17,8 +17,6 @@ python: install: - "sudo apt-get -qq install libfreetype6-dev liblcms2-dev python-qt4 ghostscript libffi-dev cmake" - "pip install cffi" - # enables pypy to compile - # - "sudo apt-get install python-tk" # webp - pushd depends && ./install_webp.sh && popd