Skip to content

Commit

Permalink
ENH deploy dev wheels to rackspace
Browse files Browse the repository at this point in the history
  • Loading branch information
ogrisel committed Dec 10, 2015
1 parent e914ef2 commit 27abfb4
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 5 deletions.
12 changes: 10 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,13 @@ matrix:
- python3-nose
- python: 2.7
env: NPY_RELAXED_STRIDES_CHECKING=0 PYTHON_OO=1
- python: 2.7
env: USE_WHEEL=1
- python: 3.5
env:
- USE_WHEEL=1
- WHEELHOUSE_UPLOADER_USERNAME=travis.numpy
# The following is generated with the command:
# travis encrypt -r numpy/numpy WHEELHOUSE_UPLOADER_SECRET=tH3AP1KeY
- secure: "IEicLPrP2uW+jW51GRwkONQpdPqMVtQL5bdroqR/U8r9TrXrbCVRhp4AP8JYZT0ptoBpmZWWGjmKBndB68QlMiUjQPowiFWt9Ka92CaqYdU7nqfWp9VImSndPmssjmCXJ1v1IjZPAMahp7Qnm0rWRmA0z9SomuRUQOJQ6s684vU="
- python: 2.7
env: PYTHONOPTIMIZE=2
before_install:
Expand All @@ -73,3 +78,6 @@ before_install:

script:
- ./tools/travis-test.sh

after_success:
- ./tools/travis-upload-wheel.sh
8 changes: 5 additions & 3 deletions tools/travis-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -94,14 +94,16 @@ export PIP
if [ -n "$USE_WHEEL" ] && [ $# -eq 0 ]; then
# Build wheel
$PIP install wheel
# ensure that the pip / setuptools versions deployed inside the venv are recent enough
$PIP install -U virtualenv
$PYTHON setup.py bdist_wheel
# Make another virtualenv to install into
virtualenv --python=python venv-for-wheel
virtualenv --python=`which $PYTHON` venv-for-wheel
. venv-for-wheel/bin/activate
# Move out of source directory to avoid finding local numpy
pushd dist
$PIP install --pre --no-index --upgrade --find-links=. numpy
$PIP install nose
pip install --pre --no-index --upgrade --find-links=. numpy
pip install nose
popd
run_test
elif [ "$USE_CHROOT" != "1" ]; then
Expand Down
11 changes: 11 additions & 0 deletions tools/travis-upload-wheel.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/bash
set -ex

export CLOUD_CONTAINER_NAME=travis-dev-wheels

if [[ ( $USE_WHEEL == 1 ) && \
( "$TRAVIS_BRANCH" == "master" ) && \
( "$TRAVIS_PULL_REQUEST" == "false" ) ]]; then
pip install wheelhouse_uploader
python -m wheelhouse_uploader upload --local-folder $TRAVIS_BUILD_DIR/dist/ $CLOUD_CONTAINER_NAME
fi

0 comments on commit 27abfb4

Please sign in to comment.