Commit 556f5fa7 authored by Matthew Brett's avatar Matthew Brett
Browse files

Initial commit to multibuild repo

parents
[submodule "terryfy"]
path = terryfy
url = https://github.com/MacPython/terryfy.git
[submodule "manylinux"]
path = manylinux
url = https://github.com/matthew-brett/manylinux-builds
env:
global:
- REPO_DIR=tornado
- BUILD_COMMIT=v4.3.0
- BUILD_DEPENDS=
- TEST_DEPENDS=
sudo: required
dist: trusty
services:
- docker
language:
- python
matrix:
include:
- os: linux
python: 2.7
- os: linux
python: 3.4
- os: linux
python: 3.5
- os: osx
language: objective-c
env: TRAVIS_PYTHON_VERSION=2.7
- os: osx
language: objective-c
env: TRAVIS_PYTHON_VERSION=3.4
- os: osx
language: objective-c
env: TRAVIS_PYTHON_VERSION=3.5
before_install:
- source travis_steps.sh
- before_install
install:
- git clone https://github.com/facebook/tornado
- build_wheels
- install_wheel
script:
- ls wheelhouse
- python -c 'import tornado; print(tornado.__file__)'
Subproject commit a8dd751b841a4dc68ad583584e217a748049585a
Subproject commit 12a4641c4e922eb4a63c82732df8d0c5045430af
#!/bin/bash
# Travis steps for Linux
set -e
BUILD_SCRIPT=${BUILD_SCRIPT:-/io/manylinux/build_package.sh}
function before_install {
virtualenv --python=python venv
source venv/bin/activate
python --version # just to check
pip install --upgrade pip wheel
}
function build_wheels {
# Builds wheel, puts into $WHEELHOUSE
#
# Depends on
# BUILD_DEPENDS
# BUILD_COMMIT
# BUILD_PRE_SCRIPT
# BUILD_SCRIPT
# REPO_DIR
# TRAVIS_PYTHON_VERSION
#
# Build both 32- and 64-bit
build_plat_wheels i686
build_plat_wheels x86_64
}
function build_plat_wheels {
# Builds wheels
#
# Depends on
#
# BUILD_DEPENDS (can be empty)
# BUILD_COMMIT
# BUILD_PRE_SCRIPT (can be empty)
# BUILD_SCRIPT
# REPO_DIR
# TRAVIS_PYTHON_VERSION
local plat=${1:-x86_64}
local docker_image=quay.io/pypa/manylinux1_$plat
docker pull $docker_image
if [ "$PLAT" == "i686" ]; then local intro_cmd=linux32; fi
docker run --rm \
-e PYTHON_VERSION=$TRAVIS_PYTHON_VERSION \
-e UNICODE_WIDTHS=$UNICODE_WIDTHS \
-e BUILD_DEPENDS=$BUILD_DEPENDS \
-e BUILD_COMMIT=$BUILD_COMMIT \
-e BUILD_PRE_SCRIPT=$BUILD_PRE_SCRIPT \
-e REPO_DIR=$REPO_DIR \
-v $PWD:/io \
$docker_image $intro_cmd $BUILD_SCRIPT
}
#!/bin/bash
set -e
# Get needed utilities
ROOT_DIR=$(dirname "$BASH_SOURCE[0]}")
TERRYFY_DIR=$ROOT_DIR/terryfy
source $TERRYFY_DIR/travis_tools.sh
function before_install {
export CC=clang
export CXX=clang++
get_python_environment macpython $TRAVIS_PYTHON_VERSION venv
source venv/bin/activate
pip install --upgrade pip wheel
}
function build_wheels {
# Builds wheel, puts into $WHEELHOUSE
#
# Depends on
# REPO_DIR
# BUILD_DEPENDS
# BUILD_COMMIT
# WHEELHOUSE
cd $REPO_DIR
git fetch origin
git checkout $BUILD_COMMIT
git clean -fxd
pip install $BUILD_DEPENDS
pip wheel -w $WHEELHOUSE --no-deps .
cd ..
pip install delocate
delocate-listdeps $WHEELHOUSE/*.whl # lists library dependencies
delocate-wheel $WHEELHOUSE/*.whl # copies library dependencies into wheel
delocate-addplat --rm-orig -x 10_9 -x 10_10 $WHEELHOUSE/*.whl
}
#!/bin/bash
WHEELHOUSE=$PWD/wheelhouse
if [ !-d $WHEELHOUSE ]; then mkdir wheelhouse; fi
PKG_NAME=${PKG_NAME:-$REPO_DIR}
if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
source travis_osx_steps.sh
else
source travis_linux_steps.sh
fi
function install_wheel {
if [ -n "$TEST_DEPENDS" ]; then pip install $TEST_DEPENDS; fi
pip install -f $WHEELHOUSE --no-index $PKG_NAME
}
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