diff --git a/.gitmodules b/.gitmodules index 199bcad14..8d2587026 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,6 +1,9 @@ -[submodule "terryfy"] - path = terryfy - url = git://github.com/MacPython/terryfy.git [submodule "Pillow"] path = Pillow url = git://github.com/python-Pillow/Pillow.git +[submodule "multibuild"] + path = multibuild + url = https://github.com/matthew-brett/multibuild.git +[submodule "terryfy"] + path = terryfy + url = https://github.com/MacPython/terryfy.git diff --git a/.travis.yml b/.travis.yml index 33a75cdc6..571bb5002 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,55 +1,91 @@ -language: - - objective-c - env: global: - - PILLOW_COMMIT=latest-tag - - REPO_DIR=Pillow - matrix: - - VERSION=2.7.10 - - VERSION=3.3.5 - - VERSION=3.4.3 - - VERSION=3.5.0 -# Disabled due to pip install issue -# - VERSION=3.2.5 + - REPO_DIR=Pillow + - BUILD_COMMIT=master + - PLAT=x86_64 + - UNICODE_WIDTH=32 + - BUILD_DEPENDS="" + - TEST_DEPENDS="nose numpy scipy" + - WHEELHOUSE_UPLOADER_USERNAME=travis-worker + # Following generated with + # travis encrypt -r python-pillow/pillow-wheels WHEELHOUSE_UPLOADER_SECRET= + - secure: "ky76goiK6n4k8V9/uG340GSFVwmjE7G76l9xbhhGZkcph4eTwN5VRM/tqyJvlNs/HZOhKSILfyGBeaG8qf7gHmwr0touPT+EjWn4TNV8iyVj75ZshgRE9DuaIAfdH89gW2m+BmvBDyzi0JE3KVCu55NcGm8h7Ecl6nmQ/c2iROY=" + +language: python +# Default Python version is usually 2.7 +python: 3.5 +sudo: required +dist: trusty +services: docker + +matrix: + exclude: + # Exclude the default Python 3.5 build + - python: 3.5 + include: + - os: linux + env: + - MB_PYTHON_VERSION=2.7 + - os: linux + env: + - MB_PYTHON_VERSION=2.7 + - UNICODE_WIDTH=16 + - os: linux + env: + - MB_PYTHON_VERSION=2.7 + - PLAT=i686 + - os: linux + env: + - MB_PYTHON_VERSION=2.7 + - PLAT=i686 + - UNICODE_WIDTH=16 + - os: linux + env: + - MB_PYTHON_VERSION=3.4 + - os: linux + env: + - MB_PYTHON_VERSION=3.4 + - PLAT=i686 + - os: linux + env: + - MB_PYTHON_VERSION=3.5 + - os: linux + env: + - MB_PYTHON_VERSION=3.5 + - PLAT=i686 + - os: osx + language: objective-c + env: MB_PYTHON_VERSION=2.7 + - os: osx + language: objective-c + env: + - MB_PYTHON_VERSION=3.3 + - os: osx + language: objective-c + env: + - MB_PYTHON_VERSION=3.4 + - os: osx + language: objective-c + env: + - MB_PYTHON_VERSION=3.5 + +before_install: + - source multibuild/common_utils.sh + - source multibuild/travis_steps.sh + - before_install install: - - source run_install.sh - - get_python_environment macpython $VERSION venv - # Update to latest wheel package for Python 3.5 - - pip install -U wheel - - pip install delocate - - if [ -n "$PILLOW_COMMIT" ]; then - checkout_commit $REPO_DIR $PILLOW_COMMIT; - fi - - cd $REPO_DIR - - python setup.py bdist_wheel - - delocate-wheel dist/*.whl - - rename_wheels dist/*.whl - - pip install dist/*.whl - - cd .. + # Maybe get and clean and patch source + - clean_code $REPO_DIR $BUILD_COMMIT + - build_wheel $REPO_DIR $PLAT script: - - cd $REPO_DIR - - python selftest.py --installed - - pip install nose - - export NOSE_PROCESS_TIMEOUT=600 - - export NOSE_PROCESSES=0 - - if [ -f test-installed.py ]; then - python test-installed.py -s -v Tests/test_*.py ; - else - python Tests/run.py --installed ; - fi - - cd .. + - install_run $PLAT -before_deploy: - - cd $REPO_DIR/dist - -deploy: - provider: cloudfiles - username: travis-upload - api-key: - secure: MqebEoOm+nNwSKWcINYJ0ct6Z16q4DBB9j/plfTw3Xc4Rr8e/OC66/hLBEga5J7afr4TkIK1849xaB2ce/Gxe2+mRM9qbg4ggz2Ul16lKhl9obFZwcP2ttLEqs//LjBHD9MAz1NMRxhwvb80OKuC2dg02/s9K7CRb2sJmDG4nC0= - region: ORD - container: wheels - skip_cleanup: true +after_success: + # Upload wheels to Rackspace container + - pip install wheelhouse-uploader + - python -m wheelhouse_uploader upload --local-folder + ${TRAVIS_BUILD_DIR}/wheelhouse/ + --no-update-index + wheels diff --git a/Pillow b/Pillow index 344cb709e..f54c60c16 160000 --- a/Pillow +++ b/Pillow @@ -1 +1 @@ -Subproject commit 344cb709ed0111adcc6ad47cc007507c3f5efeb3 +Subproject commit f54c60c162bb6f97421e4712ca65cfe9f0b3cc94 diff --git a/config.sh b/config.sh new file mode 100644 index 000000000..d8d4b89c8 --- /dev/null +++ b/config.sh @@ -0,0 +1,35 @@ +# Define custom utilities +# Test for OSX with [ -n "$IS_OSX" ] + +function pre_build { + # Any stuff that you need to do before you start building the wheels + # Runs in the root directory of this repository. + set -e + if [ -n "$IS_OSX" ]; then + source osx_build_deps.sh + else + source multibuild/library_builders.sh + build_jpeg + build_tiff + build_openjpeg + build_lcms2 + build_libwebp + build_freetype + fi +} + +function run_tests_in_repo { + # Run Pillow tests from within source repo + if [ -f test-installed.py ]; then + python test-installed.py -s -v Tests/test_*.py + else + python Tests/run.py --installed + fi +} + +function run_tests { + # Runs tests on installed distribution from an empty directory + export NOSE_PROCESS_TIMEOUT=600 + export NOSE_PROCESSES=0 + (cd ../Pillow && run_tests_in_repo) +} diff --git a/multibuild b/multibuild new file mode 160000 index 000000000..d7ba4ae3e --- /dev/null +++ b/multibuild @@ -0,0 +1 @@ +Subproject commit d7ba4ae3e76af2a6ea13d3c83ddea41d8c2e1cad diff --git a/run_install.sh b/osx_build_deps.sh similarity index 78% rename from run_install.sh rename to osx_build_deps.sh index 4206ff554..50ce52430 100644 --- a/run_install.sh +++ b/osx_build_deps.sh @@ -1,6 +1,10 @@ -source terryfy/travis_tools.sh +# Script for building Pillow dependencies on OSX source terryfy/library_installers.sh +# Compiler +export CC=clang +export CXX=clang++ + # Package versions for fresh source builds FT_VERSION=2.6.3 PNG_VERSION=1.6.23 @@ -25,8 +29,8 @@ standard_install libpng $PNG_VERSION standard_install lcms2 $LCMS_VERSION WEBP_EXTRAS="--enable-libwebpmux --enable-libwebpdemux" standard_install libwebp $WEBP_VERSION .tar.gz libwebp- "$WEBP_EXTRAS" -#standard_install openjpeg $OPENJPEG_VERSION .tar.gz openjpeg- cmake +standard_install openjpeg $OPENJPEG_VERSION .tar.gz openjpeg- cmake # Fix openjpeg library install id # https://code.google.com/p/openjpeg/issues/detail?id=367 -install_name_tool -id $PWD/build/lib/libopenjp2.6.dylib build/lib/libopenjp2.2.0.0.dylib +install_name_tool -id $PWD/build/lib/libopenjp2.7.dylib build/lib/libopenjp2.2.1.0.dylib standard_install freetype $FT_VERSION .tar.gz freetype- "--with-harfbuzz=no" diff --git a/terryfy b/terryfy index 53c812ccb..48785a36b 160000 --- a/terryfy +++ b/terryfy @@ -1 +1 @@ -Subproject commit 53c812ccbd33b02e59935a9c689f4ab773957589 +Subproject commit 48785a36b56e17a53def971153bd775aae230eba