Commit 5de2a81b authored by Dan O'Reilly's avatar Dan O'Reilly

Improve tox.ini, install py26 for travis.

Signed-off-by: 's avatarDan O'Reilly <oreilldf@gmail.com>
parent afa488c4
...@@ -2,17 +2,20 @@ ...@@ -2,17 +2,20 @@
envlist = envlist =
# Py3 tests currently fail because of text handling issues, # Py3 tests currently fail because of text handling issues,
# So only test py26/py27 for now. # So only test py26/py27 for now.
#py26,py27,py33,py34 #py{26,27,33,34}-{cpp,python}
py26,py27 py{26,27}-{cpp,python}
[testenv] [testenv]
usedevelop = true
setenv = setenv =
LD_LIBRARY_PATH={toxinidir}/../src/.libs cpp: LD_LIBRARY_PATH={toxinidir}/../src/.libs
cpp: PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=cpp
commands = commands =
python setup.py -q build_py python setup.py -q build_py
python setup.py -q build {posargs} python: python setup.py -q build
python setup.py -q test -q {posargs} cpp: python setup.py -q build --cpp_implementation
pip install --install-option {posargs: -q} . python: python setup.py -q test -q
cpp: python setup.py -q test -q --cpp_implementation
deps = deps =
six six
py26: ordereddict
py26: unittest2
...@@ -111,21 +111,30 @@ build_javanano_oracle7() { ...@@ -111,21 +111,30 @@ build_javanano_oracle7() {
build_javanano build_javanano
} }
internal_install_python_deps() {
sudo pip install tox
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
}
build_python() { build_python() {
internal_build_cpp internal_build_cpp
sudo pip install tox internal_install_python_deps
cd python cd python
tox tox -e py26-python,py27-python
cd .. cd ..
} }
build_python_cpp() { build_python_cpp() {
internal_build_cpp internal_build_cpp
sudo pip install tox internal_install_python_deps
export LD_LIBRARY_PATH=../src/.libs # for Linux export LD_LIBRARY_PATH=../src/.libs # for Linux
export DYLD_LIBRARY_PATH=../src/.libs # for OS X export DYLD_LIBRARY_PATH=../src/.libs # for OS X
cd python cd python
tox -- --cpp_implementation tox -e py26-cpp,py27-cpp
cd .. cd ..
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment