Unverified Commit 0132ff13 authored by Matthew Brett's avatar Matthew Brett Committed by GitHub
Browse files

Merge pull request #174 from matthew-brett/devel

MRG: merge devel into master

Merge of the devel branch.

* Some library builders have been fixed, along with the library builder tests.
* Add build directory to PKG_CONFIG_PATH, fixes library finding for some libs.
* Add cfitsio builder (thanks Simon Conseil).
* Use HTTPS URLs for fetching archives where available (thanks Andrew Murray).
* Fixes to is_function to prevent executing tested-for function (thanks Andrew
  Murray).
* Update manylinux URL to point to Rackspace, was pointing to Nipy server that
  now has invalid certificate, and should be retired.
parents ae3e5598 81453647
...@@ -6,36 +6,48 @@ cache: ...@@ -6,36 +6,48 @@ cache:
directories: directories:
- $HOME/.ccache - $HOME/.ccache
env:
global:
- PLAT=x86_64
matrix: matrix:
include: include:
- os: linux - os: linux
dist: precise dist: precise
# 64-bit builds
- os: linux
dist: trusty
env: env:
- TEST_BUILDS=1 - TEST_BUILDS=1
sudo: required
# 32-bit builds
- os: linux - os: linux
dist: trusty dist: trusty
env: env:
- TEST_BUILDS=1 - TEST_BUILDS=1
- PLAT=i686
sudo: required sudo: required
# Builds with caching
- os: linux - os: linux
dist: trusty dist: trusty
env: env:
- TEST_BUILDS=1 - TEST_BUILDS=1
- USE_CCACHE=1 - USE_CCACHE=1
sudo: required sudo: required
# OSX builds
- os: osx - os: osx
osx_image: xcode6.4 osx_image: xcode6.4
env: env:
- PYTHON_VERSION=2.7.11 - PYTHON_VERSION=2.7
- VENV=venv - VENV=venv
- os: osx - os: osx
env: env:
- PYTHON_VERSION=2.7.11 - PYTHON_VERSION=2.7
- TEST_BUILDS=1 - TEST_BUILDS=1
- os: osx - os: osx
language: objective-c language: objective-c
env: env:
- PYTHON_VERSION=2.7.11 - PYTHON_VERSION=2.7
- VENV=venv - VENV=venv
- os: osx - os: osx
osx_image: xcode6.4 osx_image: xcode6.4
...@@ -43,25 +55,25 @@ matrix: ...@@ -43,25 +55,25 @@ matrix:
- PYTHON_VERSION=3.3 - PYTHON_VERSION=3.3
- os: osx - os: osx
env: env:
- PYTHON_VERSION=3.4.4 - PYTHON_VERSION=3.4
- os: osx - os: osx
env: env:
- PYTHON_VERSION=3.4.4 - PYTHON_VERSION=3.4
- VENV=venv - VENV=venv
- os: osx - os: osx
env: env:
- PYTHON_VERSION=3.5.3 - PYTHON_VERSION=3.5
- os: osx - os: osx
env: env:
- PYTHON_VERSION=3.5.3 - PYTHON_VERSION=3.5
- VENV=venv - VENV=venv
- os: osx - os: osx
env: env:
- PYTHON_VERSION=3.6.1 - PYTHON_VERSION=3.6
- VENV=venv - VENV=venv
- os: osx - os: osx
env: env:
- PYTHON_VERSION=3.6.1 - PYTHON_VERSION=3.6
- VENV=venv - VENV=venv
- USE_CCACHE=1 - USE_CCACHE=1
- os: osx - os: osx
...@@ -96,6 +108,10 @@ matrix: ...@@ -96,6 +108,10 @@ matrix:
env: env:
- PYTHON_VERSION=pypy-5.7 - PYTHON_VERSION=pypy-5.7
- VENV=venv - VENV=venv
- os: osx
env:
- PYTHON_VERSION=pypy-6.0
- VENV=venv
# Default OSX (xcode image) is 10.12 (xcode 8.3.3) as of 2018-03-29 # Default OSX (xcode image) is 10.12 (xcode 8.3.3) as of 2018-03-29
# See: https://docs.travis-ci.com/user/reference/osx/ # See: https://docs.travis-ci.com/user/reference/osx/
- os: osx - os: osx
......
...@@ -88,19 +88,39 @@ function strip_ver_suffix { ...@@ -88,19 +88,39 @@ function strip_ver_suffix {
function is_function { function is_function {
# Echo "true" if input argument string is a function # Echo "true" if input argument string is a function
# Allow errors during "set -e" blocks. # Allow errors during "set -e" blocks.
(set +e; echo $($(declare -Ff "$1") > /dev/null && echo true)) (set +e; $(declare -Ff "$1" > /dev/null) && echo true)
} }
function gh-clone { function gh-clone {
git clone https://github.com/$1 git clone https://github.com/$1
} }
function set_opts {
# Set options from input options string (in $- format).
local opts=$1
local chars="exhimBH"
for (( i=0; i<${#chars}; i++ )); do
char=${chars:$i:1}
[ -n "${opts//[^${char}]/}" ] && set -$char || set +$char
done
}
function suppress { function suppress {
# Suppress the output of a bash command unless it fails # Run a command, show output only if return code not 0.
out=$( ( $@ ) 2>&1 ) # Takes into account state of -e option.
ret=$? # Compare
[ "$ret" -eq 0 ] || >&2 echo "$out" # if $? (the return of the last run command) is not zero, cat the temp file # https://unix.stackexchange.com/questions/256120/how-can-i-suppress-output-only-if-the-command-succeeds#256122
return "$ret" # return the exit status of the command # Set -e stuff agonized over in
# https://unix.stackexchange.com/questions/296526/set-e-in-a-subshell
local tmp=$(mktemp tmp.XXXXXXXXX) || return
local opts=$-
echo "Running $@"
set +e
( set_opts $opts ; $@ > "$tmp" 2>&1 ) ; ret=$?
[ "$ret" -eq 0 ] || cat "$tmp"
rm -f "$tmp"
set_opts $opts
return "$ret"
} }
function rm_mkdir { function rm_mkdir {
...@@ -137,6 +157,8 @@ function fetch_unpack { ...@@ -137,6 +157,8 @@ function fetch_unpack {
# url - URL from which to fetch archive # url - URL from which to fetch archive
# archive_fname (optional) archive name # archive_fname (optional) archive name
# #
# Echos unpacked directory and file names.
#
# If `archive_fname` not specified then use basename from `url` # If `archive_fname` not specified then use basename from `url`
# If `archive_fname` already present at download location, use that instead. # If `archive_fname` already present at download location, use that instead.
local url=$1 local url=$1
...@@ -150,10 +172,14 @@ function fetch_unpack { ...@@ -150,10 +172,14 @@ function fetch_unpack {
if [ ! -f "$out_archive" ]; then if [ ! -f "$out_archive" ]; then
curl -L $url > $out_archive curl -L $url > $out_archive
fi fi
# Unpack archive, refreshing contents # Unpack archive, refreshing contents, echoing dir and file
# names.
rm_mkdir arch_tmp rm_mkdir arch_tmp
install_rsync install_rsync
(cd arch_tmp && untar ../$out_archive && rsync --delete -ah * ..) (cd arch_tmp && \
untar ../$out_archive && \
ls -1d * &&
rsync --delete -ah * ..)
} }
function clean_code { function clean_code {
...@@ -318,7 +344,7 @@ function fill_submodule { ...@@ -318,7 +344,7 @@ function fill_submodule {
PYPY_URL=https://bitbucket.org/pypy/pypy/downloads PYPY_URL=https://bitbucket.org/pypy/pypy/downloads
# As of 2018-01-14, the latest verions of PyPy. # As of 2018-04-25, the latest verions of PyPy.
LATEST_PP_1=1.9 LATEST_PP_1=1.9
LATEST_PP_2p0=2.0.2 LATEST_PP_2p0=2.0.2
...@@ -345,6 +371,9 @@ LATEST_PP_5p9=5.9.0 ...@@ -345,6 +371,9 @@ LATEST_PP_5p9=5.9.0
LATEST_PP_5p10=5.10.1 LATEST_PP_5p10=5.10.1
LATEST_PP_5=$LATEST_PP_5p10 LATEST_PP_5=$LATEST_PP_5p10
LATEST_PP_6p0=6.0.0
LATEST_PP_6=$LATEST_PP_6p0
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
# values recursively # values recursively
......
...@@ -37,3 +37,4 @@ fi ...@@ -37,3 +37,4 @@ fi
# Promote BUILD_PREFIX on search path to any newly built libs # Promote BUILD_PREFIX on search path to any newly built libs
export CPPFLAGS="-L$BUILD_PREFIX/include $CPPFLAGS" export CPPFLAGS="-L$BUILD_PREFIX/include $CPPFLAGS"
export LIBRARY_PATH="$BUILD_PREFIX/lib:$LIBRARY_PATH" export LIBRARY_PATH="$BUILD_PREFIX/lib:$LIBRARY_PATH"
export PKG_CONFIG_PATH="$BUILD_PREFIX/lib/pkgconfig/:$PKG_CONFIG_PATH"
...@@ -23,10 +23,10 @@ GIFLIB_VERSION="${GIFLIB_VERSION:-5.1.3}" ...@@ -23,10 +23,10 @@ GIFLIB_VERSION="${GIFLIB_VERSION:-5.1.3}"
LIBWEBP_VERSION="${LIBWEBP_VERSION:-0.5.0}" LIBWEBP_VERSION="${LIBWEBP_VERSION:-0.5.0}"
XZ_VERSION="${XZ_VERSION:-5.2.2}" XZ_VERSION="${XZ_VERSION:-5.2.2}"
LIBYAML_VERSION="${LIBYAML_VERSION:-0.1.5}" LIBYAML_VERSION="${LIBYAML_VERSION:-0.1.5}"
SZIP_VERSION="${SZIP_VERSION:-2.1}" SZIP_VERSION="${SZIP_VERSION:-2.1.1}"
HDF5_VERSION="${HDF5_VERSION:-1.8.18}" HDF5_VERSION="${HDF5_VERSION:-1.10.2}"
LIBAEC_VERSION="${LIBAEC_VERSION:-0.3.3}" LIBAEC_VERSION="${LIBAEC_VERSION:-0.3.3}"
LZO_VERSION=${LZO_VERSION:-2.09} LZO_VERSION=${LZO_VERSION:-2.10}
LZF_VERSION="${LZF_VERSION:-3.6}" LZF_VERSION="${LZF_VERSION:-3.6}"
BLOSC_VERSION=${BLOSC_VERSION:-1.10.2} BLOSC_VERSION=${BLOSC_VERSION:-1.10.2}
SNAPPY_VERSION="${SNAPPY_VERSION:-1.1.3}" SNAPPY_VERSION="${SNAPPY_VERSION:-1.1.3}"
...@@ -40,6 +40,7 @@ RAGEL_VERSION=${RAGEL_VERSION:-6.10} ...@@ -40,6 +40,7 @@ RAGEL_VERSION=${RAGEL_VERSION:-6.10}
FLEX_VERSION=${FLEX_VERSION:-2.6.4} FLEX_VERSION=${FLEX_VERSION:-2.6.4}
BISON_VERSION=${BISON_VERSION:-3.0.4} BISON_VERSION=${BISON_VERSION:-3.0.4}
FFTW_VERSION=${FFTW_VERSION:-3.3.7} FFTW_VERSION=${FFTW_VERSION:-3.3.7}
CFITSIO_VERSION=${CFITSIO_VERSION:-3370}
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
...@@ -51,7 +52,7 @@ ARCHIVE_SDIR=${ARCHIVE_DIR:-archives} ...@@ -51,7 +52,7 @@ ARCHIVE_SDIR=${ARCHIVE_DIR:-archives}
function build_simple { function build_simple {
# Example: build_simple libpng $LIBPNG_VERSION \ # Example: build_simple libpng $LIBPNG_VERSION \
# http://download.sourceforge.net/libpng tar.gz \ # https://download.sourceforge.net/libpng tar.gz \
# --additional --configure --arguments # --additional --configure --arguments
local name=$1 local name=$1
local version=$2 local version=$2
...@@ -74,21 +75,14 @@ function build_simple { ...@@ -74,21 +75,14 @@ function build_simple {
function build_github { function build_github {
# Example: build_github fredrik-johansson/arb 2.11.1 # Example: build_github fredrik-johansson/arb 2.11.1
local path=$1 local path=$1
local version=$2 local tag_name=$2
local configure_args=${@:3} local configure_args=${@:3}
local name=`basename "$path"` local name=`basename "$path"`
# This is tricky. If the version name starts with a "v",
# then the archive name will not start with a "v"
if [[ $version == v* ]]; then
local name_version="${name}-${version:1}"
else
local name_version="${name}-${version}"
fi
if [ -e "${name}-stamp" ]; then if [ -e "${name}-stamp" ]; then
return return
fi fi
fetch_unpack "https://github.com/${path}/archive/${version}.tar.gz" local out_dir=$(fetch_unpack "https://github.com/${path}/archive/${tag_name}.tar.gz")
(cd $name_version \ (cd $out_dir \
&& ./configure --prefix=$BUILD_PREFIX $configure_args \ && ./configure --prefix=$BUILD_PREFIX $configure_args \
&& make -j4 \ && make -j4 \
&& make install) && make install)
...@@ -98,11 +92,13 @@ function build_github { ...@@ -98,11 +92,13 @@ function build_github {
function build_openblas { function build_openblas {
if [ -e openblas-stamp ]; then return; fi if [ -e openblas-stamp ]; then return; fi
if [ -n "$IS_OSX" ]; then if [ -n "$IS_OSX" ]; then
# https://github.com/travis-ci/travis-ci/issues/8826
brew cask uninstall oclint || echo "no oclint"
brew install openblas brew install openblas
brew link --force openblas brew link --force openblas
else else
mkdir -p $ARCHIVE_SDIR mkdir -p $ARCHIVE_SDIR
local plat=${1:-$PLAT} local plat=${1:-${PLAT:-x86_64}}
local tar_path=$(abspath $(_mb_get_gf_lib "openblas-${OPENBLAS_VERSION}" "$plat")) local tar_path=$(abspath $(_mb_get_gf_lib "openblas-${OPENBLAS_VERSION}" "$plat"))
(cd / && tar zxf $tar_path) (cd / && tar zxf $tar_path)
fi fi
...@@ -120,7 +116,7 @@ function build_zlib { ...@@ -120,7 +116,7 @@ function build_zlib {
function build_new_zlib { function build_new_zlib {
# Careful, this one may cause yum to segfault # Careful, this one may cause yum to segfault
# Fossils directory should also contain latest # Fossils directory should also contain latest
build_simple zlib $ZLIB_VERSION http://zlib.net/fossils build_simple zlib $ZLIB_VERSION https://zlib.net/fossils
} }
function build_jpeg { function build_jpeg {
...@@ -135,7 +131,7 @@ function build_jpeg { ...@@ -135,7 +131,7 @@ function build_jpeg {
function build_libpng { function build_libpng {
build_zlib build_zlib
build_simple libpng $LIBPNG_VERSION http://download.sourceforge.net/libpng build_simple libpng $LIBPNG_VERSION https://download.sourceforge.net/libpng
} }
function build_bzip2 { function build_bzip2 {
...@@ -152,7 +148,7 @@ function build_tiff { ...@@ -152,7 +148,7 @@ function build_tiff {
build_zlib build_zlib
build_jpeg build_jpeg
build_xz build_xz
build_simple tiff $TIFF_VERSION http://download.osgeo.org/libtiff build_simple tiff $TIFF_VERSION https://download.osgeo.org/libtiff
} }
function get_cmake { function get_cmake {
...@@ -174,13 +170,11 @@ function build_openjpeg { ...@@ -174,13 +170,11 @@ 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 local out_dir=$(fetch_unpack https://github.com/uclouvain/openjpeg/archive/${archive_prefix}${OPENJPEG_VERSION}.tar.gz)
(cd ${directory_prefix}${OPENJPEG_VERSION} \ (cd $out_dir \
&& $cmake -DCMAKE_INSTALL_PREFIX=$BUILD_PREFIX . \ && $cmake -DCMAKE_INSTALL_PREFIX=$BUILD_PREFIX . \
&& make install) && make install)
touch openjpeg-stamp touch openjpeg-stamp
...@@ -188,15 +182,15 @@ function build_openjpeg { ...@@ -188,15 +182,15 @@ function build_openjpeg {
function build_lcms2 { function build_lcms2 {
build_tiff build_tiff
build_simple lcms2 $LCMS2_VERSION http://downloads.sourceforge.net/project/lcms/lcms/$LCMS2_VERSION build_simple lcms2 $LCMS2_VERSION https://downloads.sourceforge.net/project/lcms/lcms/$LCMS2_VERSION
} }
function build_giflib { function build_giflib {
build_simple giflib $GIFLIB_VERSION http://downloads.sourceforge.net/project/giflib build_simple giflib $GIFLIB_VERSION https://downloads.sourceforge.net/project/giflib
} }
function build_xz { function build_xz {
build_simple xz $XZ_VERSION http://tukaani.org/xz build_simple xz $XZ_VERSION https://tukaani.org/xz
} }
function build_libwebp { function build_libwebp {
...@@ -204,25 +198,25 @@ function build_libwebp { ...@@ -204,25 +198,25 @@ function build_libwebp {
build_tiff build_tiff
build_giflib build_giflib
build_simple libwebp $LIBWEBP_VERSION \ build_simple libwebp $LIBWEBP_VERSION \
https://storage.googleapis.com/downloads.webmproject.org/releases/webp/ tar.gz \ https://storage.googleapis.com/downloads.webmproject.org/releases/webp tar.gz \
--enable-libwebpmux --enable-libwebpdemux --enable-libwebpmux --enable-libwebpdemux
} }
function build_freetype { function build_freetype {
build_libpng build_libpng
build_bzip2 build_bzip2
build_simple freetype $FREETYPE_VERSION http://download.savannah.gnu.org/releases/freetype build_simple freetype $FREETYPE_VERSION https://download.savannah.gnu.org/releases/freetype
} }
function build_libyaml { function build_libyaml {
build_simple yaml $LIBYAML_VERSION http://pyyaml.org/download/libyaml build_simple yaml $LIBYAML_VERSION https://pyyaml.org/download/libyaml
} }
function build_szip { function build_szip {
# Build szip without encoding (patent restrictions) # Build szip without encoding (patent restrictions)
build_zlib build_zlib
build_simple szip $SZIP_VERSION \ build_simple szip $SZIP_VERSION \
https://www.hdfgroup.org/ftp/lib-external/szip/ tar.gz \ https://support.hdfgroup.org/ftp/lib-external/szip/$SZIP_VERSION/src tar.gz \
--enable-encoding=no --enable-encoding=no
} }
...@@ -276,7 +270,7 @@ function build_snappy { ...@@ -276,7 +270,7 @@ function build_snappy {
function build_lzo { function build_lzo {
if [ -e lzo-stamp ]; then return; fi if [ -e lzo-stamp ]; then return; fi
fetch_unpack http://www.oberhumer.com/opensource/lzo/download/lzo-${LZO_VERSION}.tar.gz fetch_unpack https://www.oberhumer.com/opensource/lzo/download/lzo-${LZO_VERSION}.tar.gz
(cd lzo-${LZO_VERSION} \ (cd lzo-${LZO_VERSION} \
&& ./configure --prefix=$BUILD_PREFIX --enable-shared \ && ./configure --prefix=$BUILD_PREFIX --enable-shared \
&& make \ && make \
...@@ -345,7 +339,7 @@ function build_netcdf { ...@@ -345,7 +339,7 @@ function build_netcdf {
} }
function build_pcre { function build_pcre {
build_simple pcre $PCRE_VERSION https://ftp.pcre.org/pub/pcre/ build_simple pcre $PCRE_VERSION https://ftp.pcre.org/pub/pcre
} }
function build_swig { function build_swig {
...@@ -353,7 +347,7 @@ function build_swig { ...@@ -353,7 +347,7 @@ function build_swig {
brew install swig > /dev/null brew install swig > /dev/null
else else
build_pcre build_pcre
build_simple swig $SWIG_VERSION http://prdownloads.sourceforge.net/swig/ build_simple swig $SWIG_VERSION https://prdownloads.sourceforge.net/swig
fi fi
} }
...@@ -366,15 +360,15 @@ function build_suitesparse { ...@@ -366,15 +360,15 @@ function build_suitesparse {
} }
function build_libtool { function build_libtool {
build_simple libtool $LIBTOOL_VERSION https://ftp.gnu.org/gnu/libtool/ build_simple libtool $LIBTOOL_VERSION https://ftp.gnu.org/gnu/libtool
} }
function build_ragel { function build_ragel {
build_simple ragel $RAGEL_VERSION http://www.colm.net/files/ragel/ build_simple ragel $RAGEL_VERSION https://www.colm.net/files/ragel
} }
function build_bison { function build_bison {
build_simple bison $BISON_VERSION https://ftp.gnu.org/gnu/bison/ build_simple bison $BISON_VERSION https://ftp.gnu.org/gnu/bison
} }
function build_flex { function build_flex {
...@@ -387,7 +381,7 @@ function build_fftw_case { ...@@ -387,7 +381,7 @@ function build_fftw_case {
local configure_args=${@:0} local configure_args=${@:0}
build_simple fftw $FFTW_VERSION \ build_simple fftw $FFTW_VERSION \
http://www.fftw.org/ tar.gz \ http://www.fftw.org tar.gz \
--with-pic --enable-shared --enable-threads --disable-fortran \ --with-pic --enable-shared --enable-threads --disable-fortran \
$configure_args $configure_args
# eval cd fftw-$FFTW_VERSION/tests && make check-local && cd - # eval cd fftw-$FFTW_VERSION/tests && make check-local && cd -
...@@ -434,3 +428,18 @@ function build_fftw { ...@@ -434,3 +428,18 @@ function build_fftw {
# restore CFLAGS # restore CFLAGS
export CFLAGS=$old_cflags export CFLAGS=$old_cflags
} }
function build_cfitsio {
if [ -e cfitsio-stamp ]; then return; fi
if [ -n "$IS_OSX" ]; then
brew install cfitsio
else
# cannot use build_simple because cfitsio has no dash between name and version
local cfitsio_name_ver=cfitsio${CFITSIO_VERSION}
fetch_unpack https://heasarc.gsfc.nasa.gov/FTP/software/fitsio/c/${cfitsio_name_ver}.tar.gz
(cd cfitsio \
&& ./configure --prefix=$BUILD_PREFIX \
&& make shared && make install)
fi
touch cfitsio-stamp
}
...@@ -12,16 +12,16 @@ GET_PIP_URL=https://bootstrap.pypa.io/get-pip.py ...@@ -12,16 +12,16 @@ GET_PIP_URL=https://bootstrap.pypa.io/get-pip.py
DOWNLOADS_SDIR=downloads DOWNLOADS_SDIR=downloads
WORKING_SDIR=working WORKING_SDIR=working
# As of 20 December 2017 - latest Python of each version with binary download # As of 1 May 2018 - latest Python of each version with binary download
# available. # available.
# See: https://www.python.org/downloads/mac-osx/ # See: https://www.python.org/downloads/mac-osx/
LATEST_2p7=2.7.14 LATEST_2p7=2.7.15
LATEST_2p6=2.6.6 LATEST_2p6=2.6.6
LATEST_3p2=3.2.5 LATEST_3p2=3.2.5
LATEST_3p3=3.3.5 LATEST_3p3=3.3.5
LATEST_3p4=3.4.4 LATEST_3p4=3.4.4
LATEST_3p5=3.5.4 LATEST_3p5=3.5.4
LATEST_3p6=3.6.4 LATEST_3p6=3.6.5
function check_python { function check_python {
...@@ -206,7 +206,7 @@ function install_pip { ...@@ -206,7 +206,7 @@ function install_pip {
# Python 2.6 will fail SSL check # Python 2.6 will fail SSL check
local py_mm=`get_py_mm` local py_mm=`get_py_mm`
if [ "$py_mm" == "2.6" ]; then if [ "$py_mm" == "2.6" ]; then
local pip_args="--trusted-host=pypi.python.org" local pip_args="--trusted-host=pypi.org"
fi fi
# Travis VMS now install pip for system python by default - force install # Travis VMS now install pip for system python by default - force install
# even if installed already. # even if installed already.
......
...@@ -27,6 +27,16 @@ ...@@ -27,6 +27,16 @@
bar=baz bar=baz
[ "$(is_function bar)" == "" ] || ingest "is_function bar" [ "$(is_function bar)" == "" ] || ingest "is_function bar"
# Check function is not run in is_function. Thanks to Andrew Murray.
function rmfile {
rm testfile
}
touch testfile
[ "$(is_function rmfile)" == "true" ] || ingest "is_function rmfile"
[ -f testfile ] || ingest "testfile removed during isfunction check"
rm testfile
rm_mkdir tmp_dir rm_mkdir tmp_dir
[ -d tmp_dir ] || ingest "tmp_dir does not exist" [ -d tmp_dir ] || ingest "tmp_dir does not exist"
touch tmp_dir/afile touch tmp_dir/afile
...@@ -34,5 +44,47 @@ rm_mkdir tmp_dir ...@@ -34,5 +44,47 @@ rm_mkdir tmp_dir
[ -e tmp_dir/afile ] && ingest "tmp_dir/afile should have been deleted" [ -e tmp_dir/afile ] && ingest "tmp_dir/afile should have been deleted"
rmdir tmp_dir rmdir tmp_dir
# Test suppress command
function bad_cmd {
echo bad
return 1
}
function bad_mid_cmd {
# Command returns 0, but errors in the middle
echo ok for now
false
echo should be bad now
return 0
}
function good_cmd {
echo good
return 0
}
# Store state of options including -e, -x
# https://stackoverflow.com/questions/14564746/in-bash-how-to-get-the-current-status-of-set-x?utm_medium=organic&utm_source=google_rich_qa&utm_campaign=google_rich_qa
ORIG_OPTS=$-
set +ex
[ "$(suppress bad_cmd)" == "$(printf "Running bad_cmd\nbad")" ] \
|| ingest "suppress bad_cmd"
[ "$(suppress good_cmd)" == "Running good_cmd" ] \
|| ingest "suppress good_cmd"
[ "$(suppress bad_mid_cmd)" == "Running bad_mid_cmd" ] \
|| ingest "suppress bad_mid_cmd"
# Can't use pipes here, because of the effect on set -e behavior.
expected="$(printf "Running bad_cmd\nbad")"
actual="$(set -e; suppress bad_cmd)"
[ "$actual" == "$expected" ] || ingest "suppress bad_cmd set -e"
expected="$(printf "Running good_cmd")"
actual="$(set -e; suppress good_cmd)"
[ "$actual" == "$expected" ] || ingest "suppress good_cmd set -e"
expected="$(printf "Running bad_mid_cmd\nok for now")"
actual="$(set -e; suppress bad_mid_cmd)"
[ "$actual" == "$expected" ] || ingest "suppress bad_mid_cmd set -e"
# Reset options
set_opts $ORIG_OPTS
# On Linux docker containers in travis, can only be x86_64 or i686 # On Linux docker containers in travis, can only be x86_64 or i686
[ "$(get_platform)" == x86_64 ] || [ "$(get_platform)" == i686 ] || exit 1 [ "$(get_platform)" == x86_64 ] || [ "$(get_platform)" == i686 ] || exit 1
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
[ "$(fill_pypy_ver 2)" == $LATEST_PP_2 ] || ingest "lpp2" [ "$(fill_pypy_ver 2)" == $LATEST_PP_2 ] || ingest "lpp2"
[ "$(fill_pypy_ver 4)" == $LATEST_PP_4 ] || ingest "lpp4" [ "$(fill_pypy_ver 4)" == $LATEST_PP_4 ] || ingest "lpp4"
[ "$(fill_pypy_ver 5)" == $LATEST_PP_5 ] || ingest "lpp5" [ "$(fill_pypy_ver 5)" == $LATEST_PP_5 ] || ingest "lpp5"
[ "$(fill_pypy_ver 6)" == $LATEST_PP_6 ] || ingest "lpp6"
[ "$(fill_pypy_ver 2.0)" == $LATEST_PP_2p0 ] || ingest [ "$(fill_pypy_ver 2.0)" == $LATEST_PP_2p0 ] || ingest
[ "$(fill_pypy_ver 2.2)" == $LATEST_PP_2p2 ] || ingest [ "$(fill_pypy_ver 2.2)" == $LATEST_PP_2p2 ] || ingest
[ "$(fill_pypy_ver 2.3)" == $LATEST_PP_2p3 ] || ingest [ "$(fill_pypy_ver 2.3)" == $LATEST_PP_2p3 ] || ingest
...@@ -19,6 +20,7 @@ ...@@ -19,6 +20,7 @@
[ "$(fill_pypy_ver 5.8)" == $LATEST_PP_5p8 ] || ingest [ "$(fill_pypy_ver 5.8)" == $LATEST_PP_5p8 ] || ingest
[ "$(fill_pypy_ver 5.9)" == $LATEST_PP_5p9 ] || ingest [ "$(fill_pypy_ver 5.9)" == $LATEST_PP_5p9 ] || ingest
[ "$(fill_pypy_ver 5.10)" == $LATEST_PP_5p10 ] || ingest [ "$(fill_pypy_ver 5.10)" == $LATEST_PP_5p10 ] || ingest
[ "$(fill_pypy_ver 6.0)" == $LATEST_PP_6p0 ] || ingest
[ "$(fill_pypy_ver 2.6.1)" == "2.6.1" ] || ingest [ "$(fill_pypy_ver 2.6.1)" == "2.6.1" ] || ingest
[ "$(fill_pypy_ver 4.0.1)" == "4.0.1" ] || ingest [ "$(fill_pypy_ver 4.0.1)" == "4.0.1" ] || ingest
[ "$(fill_pypy_ver 5.0.1)" == "5.0.1" ] || ingest [ "$(fill_pypy_ver 5.0.1)" == "5.0.1" ] || ingest
...@@ -12,8 +12,30 @@ suppress build_libpng ...@@ -12,8 +12,30 @@ suppress build_libpng
suppress build_libwebp suppress build_libwebp
suppress build_szip suppress build_szip
suppress build_swig suppress build_swig
suppress build_github fredrik-johansson/arb 2.13.0 # We need to find a failable test for build_github
# It needs a standalone C library with ./configure script.
# E.g. arb (below) requires a couple of other libraries.
# Run here just for the output, even though they fail.
(set +e ;
build_github fredrik-johansson/arb 2.13.0 ;
build_github glennrp/libpng v1.6.34 ;
build_github wbhart/mpir mpir-3.0.0
)
suppress build_flex suppress build_flex
suppress build_openblas suppress build_openblas
suppress build_tiff
suppress build_lcms2
suppress build_xz
suppress build_freetype
suppress build_libyaml
if [ -z "$IS_OSX" ]; then
# Gives compiler conformance error on macOS Sierra:
# https://gist.github.com/5e20e137ea51fa8ca9fc443191f9d463
# https://gist.github.com/ad86c474f3c0b7ec74290bb13f9414af
suppress build_lzo
fi
suppress build_ragel
suppress build_cfitsio
suppress build_new_zlib
stop_spinner stop_spinner
...@@ -18,12 +18,14 @@ else ...@@ -18,12 +18,14 @@ else
source tests/test_manylinux_utils.sh source tests/test_manylinux_utils.sh
fi fi
if [ -n "$TEST_BUILDS" ]; then if [ -n "$TEST_BUILDS" ]; then
if [ -n "$IS_OSX" ] || [ ! -x "$(command -v docker)" ]; then if [ -n "$IS_OSX" ]; then
source tests/test_library_builders.sh source tests/test_library_builders.sh
elif [ ! -x "$(command -v docker)" ]; then
echo "Skipping build tests; no docker available"
else else
touch config.sh touch config.sh
source travis_linux_steps.sh source travis_linux_steps.sh
build_multilinux i686 "source tests/test_library_builders.sh" build_multilinux $PLAT "source tests/test_library_builders.sh"
fi fi
fi fi
......
...@@ -32,7 +32,7 @@ if ! [[ "$implementer_version" =~ $requested_version ]]; then ...@@ -32,7 +32,7 @@ if ! [[ "$implementer_version" =~ $requested_version ]]; then
ingest "Wrong python version: ${implementer_version}!=${requested_version}" ingest "Wrong python version: ${implementer_version}!=${requested_version}"
fi fi
if [ "$python_mm" == "2.6" ]; then if [ "$python_mm" == "2.6" ]; then
expected_pip_args=" --trusted-host=pypi.python.org" expected_pip_args=" --trusted-host=pypi.org"
fi fi
if [ -n "$VENV" ]; then # in virtualenv if [ -n "$VENV" ]; then # in virtualenv
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
# install_run # install_run
set -e set -e
MANYLINUX_URL=${MANYLINUX_URL:-https://nipy.bic.berkeley.edu/manylinux} MANYLINUX_URL=${MANYLINUX_URL:-https://5cf40426d9f06eb7461d-6fe47d9331aba7cd62fc36c7196769e4.ssl.cf2.rackcdn.com}
# Get our own location on this filesystem # Get our own location on this filesystem
MULTIBUILD_DIR=$(dirname "${BASH_SOURCE[0]}") MULTIBUILD_DIR=$(dirname "${BASH_SOURCE[0]}")
......
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