mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-01-12 18:26:17 +03:00
Initial commit
This commit is contained in:
commit
535e89663a
5
.gitignore
vendored
Normal file
5
.gitignore
vendored
Normal file
|
@ -0,0 +1,5 @@
|
|||
*.pyc
|
||||
*.swp
|
||||
*~
|
||||
build
|
||||
working
|
6
.gitmodules
vendored
Normal file
6
.gitmodules
vendored
Normal file
|
@ -0,0 +1,6 @@
|
|||
[submodule "terryfy"]
|
||||
path = terryfy
|
||||
url = git://github.com/matthew-brett/terryfy.git
|
||||
[submodule "Pillow"]
|
||||
path = Pillow
|
||||
url = git://github.com/python-Pillow/Pillow.git
|
33
.travis.yml
Normal file
33
.travis.yml
Normal file
|
@ -0,0 +1,33 @@
|
|||
language:
|
||||
- objective-c
|
||||
|
||||
env:
|
||||
matrix:
|
||||
- VERSION=2.7.7 NUMPY_VERSION=1.6.0
|
||||
- VERSION=3.3.5 NUMPY_VERSION=1.7.1
|
||||
- VERSION=3.4.1 NUMPY_VERSION=1.7.1
|
||||
|
||||
install:
|
||||
- source run_install.sh
|
||||
- get_python_environment macpython $VERSION venv
|
||||
- pip install delocate
|
||||
- cd Pillow
|
||||
- python setup.py bdist_wheel
|
||||
- delocate-wheel dist/*.whl
|
||||
- pip install dist/*.whl
|
||||
- cd ..
|
||||
|
||||
script:
|
||||
- cd Pillow
|
||||
- python selftest.py --installed
|
||||
- cd ..
|
||||
|
||||
before_deploy: cd scikit-image/dist
|
||||
deploy:
|
||||
provider: cloudfiles
|
||||
username: travis-worker
|
||||
api_key:
|
||||
secure: U+rKEiR6sQ+vsTJt3MuqqZwWvPV4gkjnQvzeR6cP9JZpfvkKuaa+vcgj7OngZ69DUgFTzRiTnFAxCbArGpDUkbP9V+kX5UgkePMdxhK+j9V0UOo8g+QwZtlqmV78pTXemWndwbqcy0uyfxuBpxhPXGSAHuzk+pZUbhH2zSEfh0s=
|
||||
region: ORD
|
||||
container: wheels
|
||||
skip_cleanup: true
|
1
Pillow
Submodule
1
Pillow
Submodule
|
@ -0,0 +1 @@
|
|||
Subproject commit a45c8aaf61029bad7fb1e49edc1e8ed811979c94
|
BIN
archives/freetype-2.5.3.tar.gz
Normal file
BIN
archives/freetype-2.5.3.tar.gz
Normal file
Binary file not shown.
BIN
archives/jpegsrc.v9a.tar.gz
Normal file
BIN
archives/jpegsrc.v9a.tar.gz
Normal file
Binary file not shown.
BIN
archives/lcms2-2.6.tar.gz
Normal file
BIN
archives/lcms2-2.6.tar.gz
Normal file
Binary file not shown.
BIN
archives/libpng-1.6.12.tar.gz
Normal file
BIN
archives/libpng-1.6.12.tar.gz
Normal file
Binary file not shown.
BIN
archives/libwebp-0.4.0.tar.gz
Normal file
BIN
archives/libwebp-0.4.0.tar.gz
Normal file
Binary file not shown.
BIN
archives/openjpeg-2.0.0.tar.gz
Normal file
BIN
archives/openjpeg-2.0.0.tar.gz
Normal file
Binary file not shown.
BIN
archives/pkg-config-0.28.tar.gz
Normal file
BIN
archives/pkg-config-0.28.tar.gz
Normal file
Binary file not shown.
BIN
archives/tiff-4.0.3.tar.gz
Normal file
BIN
archives/tiff-4.0.3.tar.gz
Normal file
Binary file not shown.
223
library_installers.sh
Executable file
223
library_installers.sh
Executable file
|
@ -0,0 +1,223 @@
|
|||
# Travis install
|
||||
# source this script to run the install on travis OSX workers
|
||||
|
||||
# Get needed utilities
|
||||
source terryfy/travis_tools.sh
|
||||
|
||||
# Package versions / URLs for fresh source builds (MacPython only)
|
||||
PKG_CONFIG_VERSION=0.28
|
||||
FT_BASE_URL=http://sourceforge.net/projects/freetype/files/freetype2
|
||||
FT_VERSION="2.5.3"
|
||||
PNG_BASE_URL=http://downloads.sourceforge.net/project/libpng/libpng16
|
||||
PNG_VERSION="1.6.12"
|
||||
TCL_VERSION="8.5.14.0"
|
||||
TCL_RELEASE_DMG="http://downloads.activestate.com/ActiveTcl/releases/$TCL_VERSION/ActiveTcl$TCL_VERSION.296777-macosx10.5-i386-x86_64-threaded.dmg"
|
||||
XQ_BASE_URL=http://xquartz.macosforge.org/downloads/SL
|
||||
XQUARTZ_VERSION="2.7.4"
|
||||
JPEG_URL=http://www.ijg.org/files
|
||||
JPEG_VERSION=9a
|
||||
OPENJPEG_VERSION=2.0.0
|
||||
TIFF_URL=ftp://ftp.remotesensing.org/pub/libtiff
|
||||
TIFF_VERSION=4.0.3
|
||||
LCMS_VERSION=2.6
|
||||
WEBP_VERSION=0.4.0
|
||||
|
||||
# Compiler defaults
|
||||
SYS_CC=clang
|
||||
SYS_CXX=clang++
|
||||
ARCH_FLAGS="-arch i386 -arch x86_64"
|
||||
MACOSX_DEPLOYMENT_TARGET='10.6'
|
||||
|
||||
|
||||
function check_version {
|
||||
if [ -z "$version" ]; then
|
||||
echo "Need version"
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
function check_var {
|
||||
if [ -z "$1" ]; then
|
||||
echo "Undefined required variable"
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
function init_vars {
|
||||
SRC_PREFIX=$PWD/working
|
||||
BUILD_PREFIX=$PWD/build
|
||||
export PATH=$BUILD_PREFIX/bin:$PATH
|
||||
CPATH=$BUILD_PREFIX/include
|
||||
LIBRARY_PATH=$BUILD_PREFIX/lib
|
||||
}
|
||||
|
||||
|
||||
function clean_builds {
|
||||
check_var $SRC_PREFIX
|
||||
check_var $BUILD_PREFIX
|
||||
rm -rf $SRC_PREFIX
|
||||
mkdir $SRC_PREFIX
|
||||
rm -rf $BUILD_PREFIX
|
||||
mkdir $BUILD_PREFIX
|
||||
cd Pillow
|
||||
git clean -fxd
|
||||
git reset --hard
|
||||
cd ..
|
||||
}
|
||||
|
||||
|
||||
function install_pkg_config {
|
||||
check_var $PKG_CONFIG_VERSION
|
||||
check_var $SRC_PREFIX
|
||||
check_var $BUILD_PREFIX
|
||||
local archive_path="archives/pkg-config-${PKG_CONFIG_VERSION}.tar.gz"
|
||||
tar zxvf $archive_path -C $SRC_PREFIX
|
||||
cd $SRC_PREFIX/pkg-config-$PKG_CONFIG_VERSION
|
||||
require_success "Failed to cd to pkg-config directory"
|
||||
./configure --prefix=$BUILD_PREFIX --with-internal-glib
|
||||
make
|
||||
make install
|
||||
require_success "Failed to install pkg-config $version"
|
||||
cd ../..
|
||||
}
|
||||
|
||||
|
||||
function install_tkl_85 {
|
||||
curl $TCL_RELEASE_DMG > ActiveTCL.dmg
|
||||
require_success "Failed to download TCL $TCL_VERSION"
|
||||
hdiutil attach ActiveTCL.dmg -mountpoint /Volumes/ActiveTcl
|
||||
sudo installer -pkg /Volumes/ActiveTcl/ActiveTcl-8.5.pkg -target /
|
||||
require_success "Failed to install ActiveTcl $TCL_VERSION"
|
||||
}
|
||||
|
||||
|
||||
function install_jpeg {
|
||||
check_var $JPEG_VERSION
|
||||
check_var $SRC_PREFIX
|
||||
check_var $BUILD_PREFIX
|
||||
local archive_path="archives/jpegsrc.v${JPEG_VERSION}.tar.gz"
|
||||
tar zxvf $archive_path -C $SRC_PREFIX
|
||||
cd $SRC_PREFIX/jpeg-$JPEG_VERSION
|
||||
require_success "Failed to cd to jpeg directory"
|
||||
CC=${SYS_CC} CXX=${SYS_CXX} CFLAGS=$ARCH_FLAGS ./configure --prefix=$BUILD_PREFIX
|
||||
make
|
||||
make install
|
||||
require_success "Failed to install jpeg $version"
|
||||
cd ../..
|
||||
}
|
||||
|
||||
|
||||
function install_openjpeg {
|
||||
check_var $OPENJPEG_VERSION
|
||||
check_var $SRC_PREFIX
|
||||
check_var $BUILD_PREFIX
|
||||
local archive_path="archives/openjpeg-${OPENJPEG_VERSION}.tar.gz"
|
||||
tar zxvf $archive_path -C $SRC_PREFIX
|
||||
cd $SRC_PREFIX/openjpeg-$OPENJPEG_VERSION
|
||||
require_success "Failed to cd to openjpeg directory"
|
||||
CC=${SYS_CC} CXX=${SYS_CXX} CFLAGS=$ARCH_FLAGS \
|
||||
CMAKE_INCLUDE_PATH=$CPATH \
|
||||
CMAKE_LIBRARY_PATH=$LIBRARY_PATH \
|
||||
cmake -DCMAKE_INSTALL_PREFIX:PATH=$BUILD_PREFIX .
|
||||
make
|
||||
make install
|
||||
require_success "Failed to install openjpeg $version"
|
||||
cd ../..
|
||||
}
|
||||
|
||||
|
||||
function install_tiff {
|
||||
check_var $TIFF_VERSION
|
||||
check_var $SRC_PREFIX
|
||||
check_var $BUILD_PREFIX
|
||||
local archive_path="archives/tiff-${TIFF_VERSION}.tar.gz"
|
||||
tar zxvf $archive_path -C $SRC_PREFIX
|
||||
cd $SRC_PREFIX/tiff-$TIFF_VERSION
|
||||
require_success "Failed to cd to tiff directory"
|
||||
CC=${SYS_CC} CXX=${SYS_CXX} CFLAGS=$ARCH_FLAGS ./configure --prefix=$BUILD_PREFIX
|
||||
make
|
||||
make install
|
||||
require_success "Failed to install tiff $version"
|
||||
cd ../..
|
||||
}
|
||||
|
||||
|
||||
function install_libpng {
|
||||
check_var $PNG_VERSION
|
||||
check_var $SRC_PREFIX
|
||||
check_var $BUILD_PREFIX
|
||||
local archive_path="archives/libpng-${PNG_VERSION}.tar.gz"
|
||||
tar zxvf $archive_path -C $SRC_PREFIX
|
||||
cd $SRC_PREFIX/libpng-$PNG_VERSION
|
||||
require_success "Failed to cd to png directory"
|
||||
CC=${SYS_CC} CXX=${SYS_CXX} CFLAGS=$ARCH_FLAGS ./configure --prefix=$BUILD_PREFIX
|
||||
make
|
||||
make install
|
||||
require_success "Failed to install png $version"
|
||||
cd ../..
|
||||
}
|
||||
|
||||
|
||||
function install_freetype {
|
||||
check_var $FT_VERSION
|
||||
check_var $SRC_PREFIX
|
||||
check_var $BUILD_PREFIX
|
||||
local archive_path="archives/freetype-${FT_VERSION}.tar.gz"
|
||||
tar zxvf $archive_path -C $SRC_PREFIX
|
||||
cd $SRC_PREFIX/freetype-$FT_VERSION
|
||||
require_success "Failed to cd to freetype directory"
|
||||
CC=${SYS_CC} CXX=${SYS_CXX} CFLAGS=$ARCH_FLAGS ./configure --prefix=$BUILD_PREFIX
|
||||
make
|
||||
make install
|
||||
require_success "Failed to install freetype $version"
|
||||
cd ../..
|
||||
}
|
||||
|
||||
|
||||
function install_lcms2 {
|
||||
check_var $LCMS_VERSION
|
||||
check_var $SRC_PREFIX
|
||||
check_var $BUILD_PREFIX
|
||||
local archive_path="archives/lcms2-${LCMS_VERSION}.tar.gz"
|
||||
tar zxvf $archive_path -C $SRC_PREFIX
|
||||
cd $SRC_PREFIX/lcms2-$LCMS_VERSION
|
||||
require_success "Failed to cd to lcms2 directory"
|
||||
CC=${SYS_CC} CXX=${SYS_CXX} CFLAGS=$ARCH_FLAGS ./configure --prefix=$BUILD_PREFIX
|
||||
make
|
||||
make install
|
||||
require_success "Failed to install lcms $version"
|
||||
cd ../..
|
||||
}
|
||||
|
||||
|
||||
function install_webp {
|
||||
check_var $WEBP_VERSION
|
||||
check_var $SRC_PREFIX
|
||||
check_var $BUILD_PREFIX
|
||||
local archive_path="archives/libwebp-${WEBP_VERSION}.tar.gz"
|
||||
tar zxvf $archive_path -C $SRC_PREFIX
|
||||
cd $SRC_PREFIX/libwebp-$WEBP_VERSION
|
||||
require_success "Failed to cd to libwebp directory"
|
||||
CC=${SYS_CC} CXX=${SYS_CXX} CFLAGS=$ARCH_FLAGS ./configure \
|
||||
--enable-libwebpmux \
|
||||
--enable-libwebpdemux \
|
||||
--prefix=$BUILD_PREFIX
|
||||
make
|
||||
make install
|
||||
require_success "Failed to install webp $version"
|
||||
cd ../..
|
||||
}
|
||||
|
||||
|
||||
function install_xquartz {
|
||||
local version=$1
|
||||
check_version
|
||||
curl $XQ_BASE_URL/XQuartz-$version.dmg > xquartz.dmg
|
||||
require_success "failed to download XQuartz"
|
||||
|
||||
hdiutil attach xquartz.dmg -mountpoint /Volumes/XQuartz
|
||||
sudo installer -pkg /Volumes/XQuartz/XQuartz.pkg -target /
|
||||
require_success "Failed to install XQuartz $version"
|
||||
}
|
16
run_install.sh
Normal file
16
run_install.sh
Normal file
|
@ -0,0 +1,16 @@
|
|||
source terryfy/travis_tools.sh
|
||||
source library_installers.sh
|
||||
|
||||
init_vars
|
||||
clean_builds
|
||||
# Need pkg-config for freetype library detection
|
||||
install_pkg_config
|
||||
install_jpeg
|
||||
install_tiff
|
||||
install_libpng
|
||||
install_lcms2
|
||||
install_webp
|
||||
install_openjpeg
|
||||
# Fix openjpeg library install id
|
||||
install_name_tool -id $PWD/build/lib/libopenjp2.6.dylib build/lib/libopenjp2.2.0.0.dylib
|
||||
install_freetype
|
1
terryfy
Submodule
1
terryfy
Submodule
|
@ -0,0 +1 @@
|
|||
Subproject commit ba6a7a574c8b4951718bf0c61cd9a0fe300213ae
|
Loading…
Reference in New Issue
Block a user