Merge pull request #36 from matthew-brett/refactor-to-multibuild

MRG: refactored repo to build manylinux1 wheels
This commit is contained in:
wiredfool 2016-06-30 18:50:47 +01:00 committed by GitHub
commit cce7ad8c00
7 changed files with 135 additions and 56 deletions

9
.gitmodules vendored
View File

@ -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

View File

@ -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=<the api key>
- 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

2
Pillow

@ -1 +1 @@
Subproject commit 344cb709ed0111adcc6ad47cc007507c3f5efeb3
Subproject commit f54c60c162bb6f97421e4712ca65cfe9f0b3cc94

35
config.sh Normal file
View File

@ -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)
}

1
multibuild Submodule

@ -0,0 +1 @@
Subproject commit d7ba4ae3e76af2a6ea13d3c83ddea41d8c2e1cad

View File

@ -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"

@ -1 +1 @@
Subproject commit 53c812ccbd33b02e59935a9c689f4ab773957589
Subproject commit 48785a36b56e17a53def971153bd775aae230eba