Skip to content

Commit 581edde

Browse files
committed
Also build on Mac
1 parent 535f1dd commit 581edde

File tree

2 files changed

+26
-8
lines changed

2 files changed

+26
-8
lines changed

.travis.yml

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
language: python
1+
language: c
22

33
matrix:
44
include:
@@ -7,18 +7,30 @@ matrix:
77
env: RELEASE=trusty
88
- sudo: required
99
env: RELEASE=precise
10+
- os: osx
11+
osx_image: xcode8.2
12+
env: RELEASE=sierra
13+
- os: osx
14+
osx_image: xcode7.3
15+
env: RELEASE=elcapitan
1016

1117
env:
1218
global:
1319
- VERSION='3.7-dev'
1420
- ALIAS=nightly
1521

1622
install:
17-
- pushd /opt/pyenv/
18-
- sudo git checkout master
19-
- sudo git pull
20-
- popd
21-
- python -m pip install virtualenv
23+
- |
24+
if [[ "$(uname)" == "Linux" ]] ; then
25+
pushd /opt/pyenv/
26+
sudo git checkout master
27+
sudo git pull
28+
popd
29+
else
30+
brew uninstall pyenv
31+
brew install pyenv --HEAD
32+
fi
33+
- sudo -H python -m pip install virtualenv --upgrade
2234

2335
before_script:
2436
- 'export INSTALL_DEST=${INSTALL_DEST:-/opt/python}'

bin/compile

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,14 @@ function install_numpy() {
2121

2222
set -o xtrace
2323

24-
sudo env PYTHON_BUILD_ROOT=/opt/pyenv/plugins/python-build \
25-
/opt/pyenv/plugins/python-build/bin/python-build $VERSION $INSTALL_DEST/$VERSION
24+
if [[ "$(uname)" == "Linux" ]] ; then
25+
PYENV_ROOT=/opt/pyenv
26+
else
27+
PYENV_ROOT=/usr/local/opt/pyenv
28+
fi
29+
30+
sudo env PYTHON_BUILD_ROOT=$PYENV_ROOT/plugins/python-build \
31+
$PYENV_ROOT/plugins/python-build/bin/python-build $VERSION $INSTALL_DEST/$VERSION
2632

2733
if [[ $ALIAS ]] ; then
2834
rm -f $INSTALL_DEST/$ALIAS

0 commit comments

Comments
 (0)