Skip to content

Commit

Permalink
Add manylinux tag variable
Browse files Browse the repository at this point in the history
  • Loading branch information
matthew-brett committed Aug 17, 2019
1 parent ed1cfaf commit 41c89a5
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 3 deletions.
6 changes: 6 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@ matrix:
dist: xenial
env:
- TEST_BUILDS=1
# 64-bit builds, manylinux2014
- os: linux
dist: xenial
env:
- TEST_BUILDS=1
- MB_ML_VER=2010
# 32-bit builds
- os: linux
dist: xenial
Expand Down
7 changes: 6 additions & 1 deletion tests/test_library_builders.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
# Test some library builders

# The environment
uname -a
ldd --version

# Smoke test
export BUILD_PREFIX="${PWD}/builds"
rm_mkdir $BUILD_PREFIX
Expand Down Expand Up @@ -46,4 +51,4 @@ suppress build_new_zlib
stop_spinner

# Exit 1 if any test errors
barf
barf
11 changes: 9 additions & 2 deletions travis_linux_steps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ set -e

MANYLINUX_URL=${MANYLINUX_URL:-https://5cf40426d9f06eb7461d-6fe47d9331aba7cd62fc36c7196769e4.ssl.cf2.rackcdn.com}

# Default Manylinux version
# Warning: ignored if DOCKER_IMAGE variable is set.
# See build_multilinux function.
MB_ML_VER=${MB_ML_VER:-1}

# Get our own location on this filesystem
MULTIBUILD_DIR=$(dirname "${BASH_SOURCE[0]}")

Expand Down Expand Up @@ -70,15 +75,16 @@ function build_multilinux {
#
# Depends on
# MB_PYTHON_VERSION
# MB_ML_VER
# UNICODE_WIDTH (optional)
# BUILD_DEPENDS (optional)
# DOCKER_IMAGE (optional)
# DOCKER_IMAGE (optional)
# MANYLINUX_URL (optional)
# WHEEL_SDIR (optional)
local plat=$1
[ -z "$plat" ] && echo "plat not defined" && exit 1
local build_cmds="$2"
local docker_image=${DOCKER_IMAGE:-quay.io/pypa/manylinux1_\$plat}
local docker_image=${DOCKER_IMAGE:-quay.io/pypa/manylinux${MB_ML_VER}_\$plat}
docker_image=$(eval echo "$docker_image")
retry docker pull $docker_image
docker run --rm \
Expand All @@ -95,6 +101,7 @@ function build_multilinux {
-e USE_CCACHE="$USE_CCACHE" \
-e REPO_DIR="$repo_dir" \
-e PLAT="$PLAT" \
-e MB_ML_VER="$MB_ML_VER" \
-v $PWD:/io \
-v $HOME:/parent-home \
$docker_image /io/$MULTIBUILD_DIR/docker_build_wrap.sh
Expand Down

0 comments on commit 41c89a5

Please sign in to comment.