Skip to content

Commit ca93bb2

Browse files
committed
Update pyenv installation method on macOS under Travis CI
1 parent f53011c commit ca93bb2

File tree

4 files changed

+22
-15
lines changed

4 files changed

+22
-15
lines changed

.ci/travis-install.sh

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,16 @@
33
set -e -x
44

55
if [ "${TRAVIS_OS_NAME}" == "osx" ]; then
6-
brew update
7-
8-
brew outdated postgresql || brew upgrade postgresql
9-
10-
brew outdated pyenv || brew upgrade pyenv
6+
git clone --depth 1 https://github.com/yyuu/pyenv.git ~/.pyenv
7+
PYENV_ROOT="$HOME/.pyenv"
8+
PATH="$PYENV_ROOT/bin:$PATH"
119
eval "$(pyenv init -)"
12-
pyenv versions
1310

1411
if ! (pyenv versions | grep "${PYTHON_VERSION}$"); then
1512
pyenv install ${PYTHON_VERSION}
1613
fi
17-
pyenv local ${PYTHON_VERSION}
14+
pyenv global ${PYTHON_VERSION}
15+
pyenv rehash
1816
fi
1917

2018
pip install --upgrade pip wheel

.ci/travis-tests.sh

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#!/bin/bash
2+
3+
set -e -x
4+
5+
if [ "${TRAVIS_OS_NAME}" == "osx" ]; then
6+
PYENV_ROOT="$HOME/.pyenv"
7+
PATH="$PYENV_ROOT/bin:$PATH"
8+
eval "$(pyenv init -)"
9+
fi
10+
11+
make && make test
12+
make debug && make test

.travis.yml

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,6 @@ services:
66
- postgresql
77
- docker
88

9-
addons:
10-
postgresql: '9.4'
11-
129
env:
1310
global:
1411
- PYMODULE=asyncpg
@@ -19,7 +16,7 @@ env:
1916
matrix:
2017
include:
2118
- os: osx
22-
osx_image: beta-xcode6.1 # OS X 10.9
19+
osx_image: xcode7.1 # OS X 10.10
2320
# Travis macOS env does not support Python yet,
2421
# so we have to set things up manually in install.sh.
2522
env: PYTHON_VERSION=3.5.2
@@ -30,6 +27,8 @@ matrix:
3027
language: python
3128
python: "3.5"
3229
services: [postgresql, docker]
30+
addons:
31+
postgresql: '9.4'
3332

3433
cache:
3534
directories:
@@ -42,9 +41,7 @@ install:
4241
- .ci/travis-install.sh
4342

4443
script:
45-
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then eval "$(pyenv init -)"; fi
46-
- make && make test
47-
- make debug && make test
44+
- .ci/travis-tests.sh
4845
- .ci/travis-build-docs.sh
4946

5047
before_deploy:

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ def _patch_cfile(self, cfile):
162162

163163
setuptools.setup(
164164
name='asyncpg',
165-
version='0.6.2',
165+
version='0.6.3',
166166
description='An asyncio PosgtreSQL driver',
167167
classifiers=[
168168
'License :: OSI Approved :: Apache Software License',

0 commit comments

Comments
 (0)