Unverified Commit 3fc0a6db authored by xoviat's avatar xoviat Committed by GitHub
Browse files

Merge branch 'devel' into build_simple

parents 1eb48003 7aa74304
...@@ -12,6 +12,11 @@ matrix: ...@@ -12,6 +12,11 @@ matrix:
dist: trusty dist: trusty
env: env:
- TEST_BUILDS=1 - TEST_BUILDS=1
- os: linux
dist: trusty
env:
- TEST_BUILDS=1
- USE_CCACHE=1
- os: osx - os: osx
osx_image: xcode6.4 osx_image: xcode6.4
env: env:
...@@ -53,6 +58,11 @@ matrix: ...@@ -53,6 +58,11 @@ matrix:
env: env:
- PYTHON_VERSION=3.6.1 - PYTHON_VERSION=3.6.1
- VENV=venv - VENV=venv
- os: osx
env:
- PYTHON_VERSION=3.6.1
- VENV=venv
- USE_CCACHE=1
- os: osx - os: osx
env: env:
- PYTHON_VERSION=pypy-2.6 - PYTHON_VERSION=pypy-2.6
......
...@@ -10,7 +10,7 @@ function DownloadMiniconda ($python_version, $platform_suffix) { ...@@ -10,7 +10,7 @@ function DownloadMiniconda ($python_version, $platform_suffix) {
if ($python_version -gt "3") { if ($python_version -gt "3") {
$filename = "Miniconda3-latest-Windows-" + $platform_suffix + ".exe" $filename = "Miniconda3-latest-Windows-" + $platform_suffix + ".exe"
} else { } else {
$filename = "Miniconda-latest-Windows-" + $platform_suffix + ".exe" $filename = "Miniconda2-latest-Windows-" + $platform_suffix + ".exe"
} }
$url = $MINICONDA_URL + $filename $url = $MINICONDA_URL + $filename
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
:: cmd interpreter, at least for (SDK v7.0) :: cmd interpreter, at least for (SDK v7.0)
:: ::
:: More details at: :: More details at:
:: https://github.com/cython/cython/wiki/64BitCythonExtensionsOnWindows :: https://github.com/cython/cython/wiki/CythonExtensionsOnWindows
:: https://stackoverflow.com/a/13751649/163740 :: https://stackoverflow.com/a/13751649/163740
:: ::
:: Original Author: Olivier Grisel :: Original Author: Olivier Grisel
......
...@@ -268,24 +268,26 @@ PYPY_URL=https://bitbucket.org/pypy/pypy/downloads ...@@ -268,24 +268,26 @@ PYPY_URL=https://bitbucket.org/pypy/pypy/downloads
# As of 2017-03-25, the latest verions of PyPy. # As of 2017-03-25, the latest verions of PyPy.
LATEST_PP_1=1.9 LATEST_PP_1=1.9
LATEST_PP_2=2.6
LATEST_PP_2p0=2.0.2 LATEST_PP_2p0=2.0.2
# No minor version numbers for 2.1
LATEST_PP_2p1=2.1
LATEST_PP_2p2=2.2.1 LATEST_PP_2p2=2.2.1
LATEST_PP_2p3=2.3.1 LATEST_PP_2p3=2.3.1
LATEST_PP_2p4=2.4.0 LATEST_PP_2p4=2.4.0
LATEST_PP_2p5=2.5.1 LATEST_PP_2p5=2.5.1
LATEST_PP_2p6=2.6.1 LATEST_PP_2p6=2.6.1
LATEST_PP_2=$LATEST_PP_2p6
LATEST_PP_4=4.0
LATEST_PP_4p0=4.0.1 LATEST_PP_4p0=4.0.1
LATEST_PP_4=$LATEST_PP_4p0
LATEST_PP_5=5.7
LATEST_PP_5p0=5.0.1 LATEST_PP_5p0=5.0.1
LATEST_PP_5p1=5.1.1 LATEST_PP_5p1=5.1.1
LATEST_PP_5p3=5.3.1 LATEST_PP_5p3=5.3.1
LATEST_PP_5p4=5.4.1 LATEST_PP_5p4=5.4.1
LATEST_PP_5p6=5.6.0 LATEST_PP_5p6=5.6.0
LATEST_PP_5p7=5.7.0 LATEST_PP_5p7=5.7.0
LATEST_PP_5=$LATEST_PP_5p7
function unroll_version { function unroll_version {
# Convert major or major.minor format to major.minor.micro using the above # Convert major or major.minor format to major.minor.micro using the above
......
...@@ -7,6 +7,10 @@ ...@@ -7,6 +7,10 @@
# BUILD_DEPENDS (may be used by config.sh, can be empty) # BUILD_DEPENDS (may be used by config.sh, can be empty)
set -e set -e
if [ "$USE_CCACHE" == "1" ]; then
activate_ccache
fi
# Unicode width, default 32 # Unicode width, default 32
UNICODE_WIDTH=${UNICODE_WIDTH:-32} UNICODE_WIDTH=${UNICODE_WIDTH:-32}
......
...@@ -27,6 +27,9 @@ BLOSC_VERSION=${BLOSC_VERSION:-1.10.2} ...@@ -27,6 +27,9 @@ BLOSC_VERSION=${BLOSC_VERSION:-1.10.2}
SNAPPY_VERSION="${SNAPPY_VERSION:-1.1.3}" SNAPPY_VERSION="${SNAPPY_VERSION:-1.1.3}"
CURL_VERSION=${CURL_VERSION:-7.49.1} CURL_VERSION=${CURL_VERSION:-7.49.1}
NETCDF_VERSION=${NETCDF_VERSION:-4.4.1.1} NETCDF_VERSION=${NETCDF_VERSION:-4.4.1.1}
SWIG_VERSION=${SWIG_VERSION:-3.0.12}
PCRE_VERSION=${PCRE_VERSION:-8.38}
SUITESPARSE_VERSION=${SUITESPARSE_VERSION:-4.5.6}
OPENSSL_ROOT=openssl-1.0.2l OPENSSL_ROOT=openssl-1.0.2l
# Hash from https://www.openssl.org/source/openssl-1.0.2?.tar.gz.sha256 # Hash from https://www.openssl.org/source/openssl-1.0.2?.tar.gz.sha256
OPENSSL_HASH=ce07195b659e75f4e1db43552860070061f156a98bb37b672b101ba6e3ddf30c OPENSSL_HASH=ce07195b659e75f4e1db43552860070061f156a98bb37b672b101ba6e3ddf30c
...@@ -153,11 +156,13 @@ function build_openjpeg { ...@@ -153,11 +156,13 @@ function build_openjpeg {
build_lcms2 build_lcms2
local cmake=$(get_cmake) local cmake=$(get_cmake)
local archive_prefix="v" local archive_prefix="v"
local directory_prefix="openjpeg-"
if [ $(lex_ver $OPENJPEG_VERSION) -lt $(lex_ver 2.1.1) ]; then if [ $(lex_ver $OPENJPEG_VERSION) -lt $(lex_ver 2.1.1) ]; then
archive_prefix="version." archive_prefix="version."
directory_prefix="openjpeg-version."
fi fi
fetch_unpack https://github.com/uclouvain/openjpeg/archive/${archive_prefix}${OPENJPEG_VERSION}.tar.gz fetch_unpack https://github.com/uclouvain/openjpeg/archive/${archive_prefix}${OPENJPEG_VERSION}.tar.gz
(cd openjpeg-version.${OPENJPEG_VERSION} \ (cd ${directory_prefix}${OPENJPEG_VERSION} \
&& $cmake -DCMAKE_INSTALL_PREFIX=$BUILD_PREFIX . \ && $cmake -DCMAKE_INSTALL_PREFIX=$BUILD_PREFIX . \
&& make install) && make install)
touch openjpeg-stamp touch openjpeg-stamp
...@@ -320,3 +325,24 @@ function build_netcdf { ...@@ -320,3 +325,24 @@ function build_netcdf {
&& make install) && make install)
touch netcdf-stamp touch netcdf-stamp
} }
function build_pcre {
build_simple pcre $PCRE_VERSION https://ftp.pcre.org/pub/pcre/
}
function build_swig {
if [ -n "$IS_OSX" ]; then
brew install swig > /dev/null
else
build_pcre
build_simple swig $SWIG_VERSION http://prdownloads.sourceforge.net/swig/
fi
}
function build_suitesparse {
if [ -n "$IS_OSX" ]; then
brew install suite-sparse > /dev/null
else
yum install -y suitesparse-devel > /dev/null
fi
}
...@@ -49,3 +49,25 @@ function repair_wheelhouse { ...@@ -49,3 +49,25 @@ function repair_wheelhouse {
done done
chmod -R a+rwX $out_dir chmod -R a+rwX $out_dir
} }
function activate_ccache {
# Link up the correct location for ccache
ln -s /parent-home/.ccache $HOME/.ccache
# Now install ccache
yum install -y ccache
# Create fake compilers and prepend them to the PATH
# Note that yum is supposed to create these for us,
# but I had trouble finding them
local ccache_dir=/usr/lib/ccache/compilers
mkdir -p $ccache_dir
ln -s /usr/bin/ccache $CCACHE_DIR/gcc
ln -s /usr/bin/ccache $CCACHE_DIR/g++
ln -s /usr/bin/ccache $CCACHE_DIR/cc
ln -s /usr/bin/ccache $CCACHE_DIR/c++
export PATH=$CCACHE_DIR:$PATH
# Prove to the developer that ccache is activated
which gcc
}
...@@ -267,6 +267,9 @@ function set_py_vars { ...@@ -267,6 +267,9 @@ function set_py_vars {
} }
function get_macpython_environment { function get_macpython_environment {
if [ "$USE_CCACHE" == "1" ]; then
activate_ccache
fi
# Set up MacPython environment # Set up MacPython environment
# Parameters: # Parameters:
# $version : [implementation-]major[.minor[.patch]] # $version : [implementation-]major[.minor[.patch]]
...@@ -285,6 +288,7 @@ function get_macpython_environment { ...@@ -285,6 +288,7 @@ function get_macpython_environment {
remove_travis_ve_pip remove_travis_ve_pip
install_macpython $version install_macpython $version
install_pip install_pip
export HOMEBREW_NO_AUTO_UPDATE=1
if [ -n "$venv_dir" ]; then if [ -n "$venv_dir" ]; then
install_virtualenv install_virtualenv
make_workon_venv $venv_dir make_workon_venv $venv_dir
...@@ -332,3 +336,14 @@ function install_pkg_config { ...@@ -332,3 +336,14 @@ function install_pkg_config {
# https://github.com/matthew-brett/multibuild/issues/24#issue-221951587 # https://github.com/matthew-brett/multibuild/issues/24#issue-221951587
command -v pkg-config > /dev/null 2>&1 || brew install pkg-config command -v pkg-config > /dev/null 2>&1 || brew install pkg-config
} }
function activate_ccache {
brew update
brew install ccache
export PATH=/usr/local/opt/ccache/libexec:$PATH
export CCACHE_MAXSIZE=200M
export CCACHE_CPP2=1
# Prove to the developer that ccache is activated
which clang
}
# Test Python version fill utility, for pypy
[ "$(fill_pypy_ver 1)" == $LATEST_PP_1 ] || ingest "lpp1"
[ "$(fill_pypy_ver 2)" == $LATEST_PP_2 ] || ingest "lpp2"
[ "$(fill_pypy_ver 4)" == $LATEST_PP_4 ] || ingest "lpp4"
[ "$(fill_pypy_ver 5)" == $LATEST_PP_5 ] || ingest "lpp5"
[ "$(fill_pypy_ver 2.0)" == $LATEST_PP_2p0 ] || ingest
[ "$(fill_pypy_ver 2.2)" == $LATEST_PP_2p2 ] || ingest
[ "$(fill_pypy_ver 2.3)" == $LATEST_PP_2p3 ] || ingest
[ "$(fill_pypy_ver 2.4)" == $LATEST_PP_2p4 ] || ingest
[ "$(fill_pypy_ver 2.5)" == $LATEST_PP_2p5 ] || ingest
[ "$(fill_pypy_ver 2.6)" == $LATEST_PP_2p6 ] || ingest
[ "$(fill_pypy_ver 4.0)" == $LATEST_PP_4p0 ] || ingest
[ "$(fill_pypy_ver 5.0)" == $LATEST_PP_5p0 ] || ingest
[ "$(fill_pypy_ver 5.1)" == $LATEST_PP_5p1 ] || ingest
[ "$(fill_pypy_ver 5.3)" == $LATEST_PP_5p3 ] || ingest
[ "$(fill_pypy_ver 5.4)" == $LATEST_PP_5p4 ] || ingest
[ "$(fill_pypy_ver 5.6)" == $LATEST_PP_5p6 ] || ingest
[ "$(fill_pypy_ver 5.7)" == $LATEST_PP_5p7 ] || ingest
[ "$(fill_pypy_ver 2.6.1)" == "2.6.1" ] || ingest
[ "$(fill_pypy_ver 4.0.1)" == "4.0.1" ] || ingest
[ "$(fill_pypy_ver 5.0.1)" == "5.0.1" ] || ingest
...@@ -16,3 +16,4 @@ function suppress { ...@@ -16,3 +16,4 @@ function suppress {
suppress build_openssl suppress build_openssl
suppress build_libwebp suppress build_libwebp
suppress build_szip suppress build_szip
suppress build_swig
...@@ -9,6 +9,7 @@ if [ -n "$IS_OSX" ]; then ...@@ -9,6 +9,7 @@ if [ -n "$IS_OSX" ]; then
get_macpython_environment $PYTHON_VERSION $VENV get_macpython_environment $PYTHON_VERSION $VENV
source tests/test_python_install.sh source tests/test_python_install.sh
source tests/test_fill_pyver.sh source tests/test_fill_pyver.sh
source tests/test_fill_pypy_ver.sh
source tests/test_osx_utils.sh source tests/test_osx_utils.sh
else else
source manylinux_utils.sh source manylinux_utils.sh
......
...@@ -87,9 +87,11 @@ function build_multilinux { ...@@ -87,9 +87,11 @@ function build_multilinux {
-e WHEEL_SDIR="$WHEEL_SDIR" \ -e WHEEL_SDIR="$WHEEL_SDIR" \
-e MANYLINUX_URL="$MANYLINUX_URL" \ -e MANYLINUX_URL="$MANYLINUX_URL" \
-e BUILD_DEPENDS="$BUILD_DEPENDS" \ -e BUILD_DEPENDS="$BUILD_DEPENDS" \
-e USE_CCACHE="$USE_CCACHE" \
-e REPO_DIR="$repo_dir" \ -e REPO_DIR="$repo_dir" \
-e PLAT="$PLAT" \ -e PLAT="$PLAT" \
-v $PWD:/io \ -v $PWD:/io \
-v $HOME:/parent-home \
$docker_image /io/$MULTIBUILD_DIR/docker_build_wrap.sh $docker_image /io/$MULTIBUILD_DIR/docker_build_wrap.sh
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment