mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-01-01 04:46:18 +03:00
Merge pull request #36 from matthew-brett/refactor-to-multibuild
MRG: refactored repo to build manylinux1 wheels
This commit is contained in:
commit
cce7ad8c00
9
.gitmodules
vendored
9
.gitmodules
vendored
|
@ -1,6 +1,9 @@
|
||||||
[submodule "terryfy"]
|
|
||||||
path = terryfy
|
|
||||||
url = git://github.com/MacPython/terryfy.git
|
|
||||||
[submodule "Pillow"]
|
[submodule "Pillow"]
|
||||||
path = Pillow
|
path = Pillow
|
||||||
url = git://github.com/python-Pillow/Pillow.git
|
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
|
||||||
|
|
130
.travis.yml
130
.travis.yml
|
@ -1,55 +1,91 @@
|
||||||
language:
|
|
||||||
- objective-c
|
|
||||||
|
|
||||||
env:
|
env:
|
||||||
global:
|
global:
|
||||||
- PILLOW_COMMIT=latest-tag
|
|
||||||
- REPO_DIR=Pillow
|
- REPO_DIR=Pillow
|
||||||
matrix:
|
- BUILD_COMMIT=master
|
||||||
- VERSION=2.7.10
|
- PLAT=x86_64
|
||||||
- VERSION=3.3.5
|
- UNICODE_WIDTH=32
|
||||||
- VERSION=3.4.3
|
- BUILD_DEPENDS=""
|
||||||
- VERSION=3.5.0
|
- TEST_DEPENDS="nose numpy scipy"
|
||||||
# Disabled due to pip install issue
|
- WHEELHOUSE_UPLOADER_USERNAME=travis-worker
|
||||||
# - VERSION=3.2.5
|
# 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:
|
install:
|
||||||
- source run_install.sh
|
# Maybe get and clean and patch source
|
||||||
- get_python_environment macpython $VERSION venv
|
- clean_code $REPO_DIR $BUILD_COMMIT
|
||||||
# Update to latest wheel package for Python 3.5
|
- build_wheel $REPO_DIR $PLAT
|
||||||
- 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 ..
|
|
||||||
|
|
||||||
script:
|
script:
|
||||||
- cd $REPO_DIR
|
- install_run $PLAT
|
||||||
- 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 ..
|
|
||||||
|
|
||||||
before_deploy:
|
after_success:
|
||||||
- cd $REPO_DIR/dist
|
# Upload wheels to Rackspace container
|
||||||
|
- pip install wheelhouse-uploader
|
||||||
deploy:
|
- python -m wheelhouse_uploader upload --local-folder
|
||||||
provider: cloudfiles
|
${TRAVIS_BUILD_DIR}/wheelhouse/
|
||||||
username: travis-upload
|
--no-update-index
|
||||||
api-key:
|
wheels
|
||||||
secure: MqebEoOm+nNwSKWcINYJ0ct6Z16q4DBB9j/plfTw3Xc4Rr8e/OC66/hLBEga5J7afr4TkIK1849xaB2ce/Gxe2+mRM9qbg4ggz2Ul16lKhl9obFZwcP2ttLEqs//LjBHD9MAz1NMRxhwvb80OKuC2dg02/s9K7CRb2sJmDG4nC0=
|
|
||||||
region: ORD
|
|
||||||
container: wheels
|
|
||||||
skip_cleanup: true
|
|
||||||
|
|
2
Pillow
2
Pillow
|
@ -1 +1 @@
|
||||||
Subproject commit 344cb709ed0111adcc6ad47cc007507c3f5efeb3
|
Subproject commit f54c60c162bb6f97421e4712ca65cfe9f0b3cc94
|
35
config.sh
Normal file
35
config.sh
Normal 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
1
multibuild
Submodule
|
@ -0,0 +1 @@
|
||||||
|
Subproject commit d7ba4ae3e76af2a6ea13d3c83ddea41d8c2e1cad
|
|
@ -1,6 +1,10 @@
|
||||||
source terryfy/travis_tools.sh
|
# Script for building Pillow dependencies on OSX
|
||||||
source terryfy/library_installers.sh
|
source terryfy/library_installers.sh
|
||||||
|
|
||||||
|
# Compiler
|
||||||
|
export CC=clang
|
||||||
|
export CXX=clang++
|
||||||
|
|
||||||
# Package versions for fresh source builds
|
# Package versions for fresh source builds
|
||||||
FT_VERSION=2.6.3
|
FT_VERSION=2.6.3
|
||||||
PNG_VERSION=1.6.23
|
PNG_VERSION=1.6.23
|
||||||
|
@ -25,8 +29,8 @@ standard_install libpng $PNG_VERSION
|
||||||
standard_install lcms2 $LCMS_VERSION
|
standard_install lcms2 $LCMS_VERSION
|
||||||
WEBP_EXTRAS="--enable-libwebpmux --enable-libwebpdemux"
|
WEBP_EXTRAS="--enable-libwebpmux --enable-libwebpdemux"
|
||||||
standard_install libwebp $WEBP_VERSION .tar.gz libwebp- "$WEBP_EXTRAS"
|
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
|
# Fix openjpeg library install id
|
||||||
# https://code.google.com/p/openjpeg/issues/detail?id=367
|
# 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"
|
standard_install freetype $FT_VERSION .tar.gz freetype- "--with-harfbuzz=no"
|
2
terryfy
2
terryfy
|
@ -1 +1 @@
|
||||||
Subproject commit 53c812ccbd33b02e59935a9c689f4ab773957589
|
Subproject commit 48785a36b56e17a53def971153bd775aae230eba
|
Loading…
Reference in New Issue
Block a user