diff options
author | Feng Xiao <xfxyjwf@gmail.com> | 2015-08-25 20:24:43 -0700 |
---|---|---|
committer | Feng Xiao <xfxyjwf@gmail.com> | 2015-08-25 20:24:43 -0700 |
commit | b192ba87f72b5e3e8add09bbcbb7623831e3079b (patch) | |
tree | affb3beff3c33050e7f93647ddab8606899ff03d /travis.sh | |
parent | 5da0b46811a103bd1a953f496d4bcd5ff45d3736 (diff) | |
parent | cf94f7b74495d08b833056016e045a0ae3fb64fa (diff) | |
download | protobuf-b192ba87f72b5e3e8add09bbcbb7623831e3079b.tar.gz protobuf-b192ba87f72b5e3e8add09bbcbb7623831e3079b.tar.bz2 protobuf-b192ba87f72b5e3e8add09bbcbb7623831e3079b.zip |
Merge remote-tracking branch 'origin/master' into beta-1
Diffstat (limited to 'travis.sh')
-rwxr-xr-x | travis.sh | 38 |
1 files changed, 29 insertions, 9 deletions
@@ -111,25 +111,45 @@ build_javanano_oracle7() { build_javanano } +internal_install_python_deps() { + sudo pip install tox + # Only install Python2.6 on Linux. + if [ $(uname -s) == "Linux" ]; then + sudo apt-get install -y python-software-properties # for apt-add-repository + sudo apt-add-repository -y ppa:fkrull/deadsnakes + sudo apt-get update -qq + sudo apt-get install -y python2.6 python2.6-dev + fi +} + + build_python() { internal_build_cpp + internal_install_python_deps cd python - python setup.py build - python setup.py test - python setup.py sdist - sudo pip install virtualenv && virtualenv /tmp/protoenv && /tmp/protoenv/bin/pip install dist/* + # Only test Python 2.6 on Linux + if [ $(uname -s) == "Linux" ]; then + envlist=py26-python,py27-python + else + envlist=py27-python + fi + tox -e $envlist cd .. } build_python_cpp() { internal_build_cpp - export LD_LIBRARY_PATH=../src/.libs # for Linux + internal_install_python_deps + export LD_LIBRARY_PATH=../src/.libs # for Linux export DYLD_LIBRARY_PATH=../src/.libs # for OS X cd python - python setup.py build --cpp_implementation - python setup.py test --cpp_implementation - python setup.py sdist --cpp_implementation - sudo pip install virtualenv && virtualenv /tmp/protoenv && /tmp/protoenv/bin/pip install dist/* + # Only test Python 2.6 on Linux + if [ $(uname -s) == "Linux" ]; then + envlist=py26-cpp,py27-cpp + else + envlist=py27-cpp + fi + tox -e $envlist cd .. } |