Refactor to multibuild framework

This commit is contained in:
Matthew Brett 2016-06-20 11:30:30 -07:00
parent f03bea18af
commit 2f97ef0898
7 changed files with 125 additions and 54 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,83 @@
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=3.2.0
- PLAT=x86_64
- UNICODE_WIDTH=32
- BUILD_DEPENDS=""
- TEST_DEPENDS=nose
- 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
sudo: required
dist: trusty
services: docker
matrix:
include:
- os: linux
python: 2.7
- os: linux
python: 2.7
env:
- UNICODE_WIDTH=16
- os: linux
python: 2.7
env:
- PLAT=i686
- os: linux
python: 2.7
env:
- PLAT=i686
- UNICODE_WIDTH=16
- os: linux
python: 3.4
- os: linux
python: 3.4
env:
- PLAT=i686
- os: linux
python: 3.5
- os: linux
python: 3.5
env:
- PLAT=i686
- os: osx
language: objective-c
env: TRAVIS_PYTHON_VERSION=2.7
- os: osx
language: objective-c
env:
- TRAVIS_PYTHON_VERSION=3.3
- os: osx
language: objective-c
env:
- TRAVIS_PYTHON_VERSION=3.4
- os: osx
language: objective-c
env:
- TRAVIS_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 0132771eaa41b87c434167dc346fbddc20fb6c2a

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 d7f94ccdfe8e61468562b0056b88254381f64a7c

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

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