Skip to content

Commit

Permalink
Merge branch 'master' into release-0.6.5
Browse files Browse the repository at this point in the history
  • Loading branch information
tgsmith61591 committed Feb 10, 2018
2 parents 0034cd9 + b12ff9b commit cc3db6f
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 17 deletions.
9 changes: 9 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,15 @@ matrix:
COVERAGE=true SCIKIT_LEARN_VERSION="0.17.1" DEPLOY=true CACHEC=true
DOCKER_IMAGE="quay.io/pypa/manylinux1_x86_64" DOCKER_CONTAINER_NAME="pyramidcontainer"

# This environment tests against Linux with CPython 2.7.x built with UCS-4 encoding
- os: linux
dist: trusty
services:
- docker
env: DISTRIB="conda" PYTHON_VERSION="2.7" CYTHON_VERSION="0.23.5"
COVERAGE=true SCIKIT_LEARN_VERSION="0.17.1" DEPLOY=true CACHEC=true
DOCKER_IMAGE="quay.io/pypa/manylinux1_x86_64" DOCKER_CONTAINER_NAME="pyramidcontainer" UCS_SETTING="ucs4"

# This environment tests the same conditions as above, but tests against MAC OS X,
# using virtualenv instead of the conda python distribution
- os: osx
Expand Down
53 changes: 36 additions & 17 deletions build_tools/travis/build_wheels.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,35 @@ if [[ "${DEPLOY}" != true ]]; then
exit 0
fi

function build_wheel {
local pyver=$1
local arch=$2
local ucs_setting=$3

# https://www.python.org/dev/peps/pep-0513/#ucs-2-vs-ucs-4-builds
ucs_tag="m"
if [ "$ucs_setting" = "ucs4" ]; then
ucs_tag="${ucs_tag}u"
fi

ML_PYTHON_VERSION=$(python3 -c \
"print('cp{maj}{min}-cp{maj}{min}{ucs}'.format( \
maj='${pyver}'.split('.')[0], \
min='${pyver}'.split('.')[1], \
ucs='${ucs_tag}'))")

ML_IMAGE="quay.io/pypa/manylinux1_${arch}"
docker pull "${ML_IMAGE}"
docker run \
--name "${DOCKER_CONTAINER_NAME}" \
-v "${_root}":/io \
-e "PYMODULE=${PYMODULE}" \
-e "PYTHON_VERSION=${ML_PYTHON_VERSION}" \
"${ML_IMAGE}" "/io/build_tools/travis/build_manywheels_linux.sh"
sudo docker cp "${DOCKER_CONTAINER_NAME}:/io/dist/." "${_root}/dist/"
docker rm $(docker ps -a -f status=exited -q)
}

# Create base directory
pushd $(dirname $0) > /dev/null
_root=$(dirname $(dirname $(pwd -P))) # get one directory up from parent to get to root dir
Expand All @@ -16,23 +45,13 @@ if [ "${TRAVIS_OS_NAME}" == "linux" ]; then
echo "Building LINUX OS wheels"

for pyver in ${PYTHON_VERSION}; do
ML_PYTHON_VERSION=$(python3 -c \
"print('cp{maj}{min}-cp{maj}{min}m'.format( \
maj='${pyver}'.split('.')[0], \
min='${pyver}'.split('.')[1]))")

for arch in x86_64; do
ML_IMAGE="quay.io/pypa/manylinux1_${arch}"
docker pull "${ML_IMAGE}"
docker run \
--name "${DOCKER_CONTAINER_NAME}" \
-v "${_root}":/io \
-e "PYMODULE=${PYMODULE}" \
-e "PYTHON_VERSION=${ML_PYTHON_VERSION}" \
"${ML_IMAGE}" "/io/build_tools/travis/build_manywheels_linux.sh"
sudo docker cp "${DOCKER_CONTAINER_NAME}:/io/dist/" "${_root}/dist/"
docker rm $(docker ps -a -f status=exited -q)
done
if [ -z "$UCS_SETTING" ] || [ "$UCS_SETTING" = "ucs2" ]; then
build_wheel $pyver "x86_64" "ucs2"
elif [ "$UCS_SETTING" = "ucs4" ]; then
build_wheel $pyver "x86_64" "ucs4"
else
echo "Unrecognized UCS_SETTING: ${UCS_SETTING}"
fi
done
elif [ "${TRAVIS_OS_NAME}" == "osx" ]; then
# this should be all that's required, right? We already removed the .egg-info
Expand Down

0 comments on commit cc3db6f

Please sign in to comment.