Skip to content

Commit

Permalink
Merge pull request #407 from anthrotype/fix-python-build
Browse files Browse the repository at this point in the history
Fix python build
  • Loading branch information
eustas authored Aug 11, 2016
2 parents 014f651 + 11dc16b commit 2e0d321
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 16 deletions.
14 changes: 11 additions & 3 deletions .travis.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash

case "$1" in
"install")
Expand Down Expand Up @@ -36,14 +36,22 @@ case "$1" in
ctest -V
;;
"python")
python setup.py build_ext test
if [ "${TRAVIS_OS_NAME}" = "osx" ]; then
source venv/bin/activate
fi
python setup.py build_ext test
;;
esac
;;
"after_success")
case "${BUILD_SYSTEM}" in
"python")
pip wheel -w dist .
case "${TRAVIS_OS_NAME}" in
"osx")
source venv/bin/activate
pip wheel -w dist .
;;
esac
;;
esac
;;
Expand Down
18 changes: 5 additions & 13 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -159,19 +159,11 @@ matrix:
## Python OS X builds
###
- os: osx
env: BUILD_SYSTEM=python INSTALL_TYPE=system PYTHON_VERSION=2.7
env: BUILD_SYSTEM=python INSTALL_TYPE=macpython PYTHON_VERSION=2.7.12
- os: osx
env: BUILD_SYSTEM=python INSTALL_TYPE=macpython PYTHON_VERSION=2.7.10
env: BUILD_SYSTEM=python INSTALL_TYPE=macpython PYTHON_VERSION=3.4.4
- os: osx
env: BUILD_SYSTEM=python INSTALL_TYPE=homebrew PYTHON_VERSION=2.7.10
- os: osx
env: BUILD_SYSTEM=python INSTALL_TYPE=macpython PYTHON_VERSION=3.4.3
- os: osx
env: BUILD_SYSTEM=python INSTALL_TYPE=homebrew PYTHON_VERSION=3.4.3
- os: osx
env: BUILD_SYSTEM=python INSTALL_TYPE=macpython PYTHON_VERSION=3.5.0
- os: osx
env: BUILD_SYSTEM=python INSTALL_TYPE=homebrew PYTHON_VERSION=3.5.0
env: BUILD_SYSTEM=python INSTALL_TYPE=macpython PYTHON_VERSION=3.5.2

###
## Sanitizers
Expand Down Expand Up @@ -240,7 +232,7 @@ after_success:
- ./.travis.sh after_success

before_deploy:
- if [ "${BUILD_SYSTEM}" = "python" ]; then export WHEELS=$(ls ./dist/*.whl); fi
- if [ "${BUILD_SYSTEM}" = "python" ] && [ "${TRAVIS_OS_NAME}" = "osx" ]; then export WHEELS=$(ls ./dist/*.whl); fi

deploy:
provider: releases
Expand All @@ -251,4 +243,4 @@ deploy:
on:
repo: "google/brotli"
tags: true
condition: "${BUILD_SYSTEM} = python"
condition: "${BUILD_SYSTEM} = python && ${TRAVIS_OS_NAME} = osx"

0 comments on commit 2e0d321

Please sign in to comment.