aboutsummaryrefslogtreecommitdiff
path: root/travis.sh
diff options
context:
space:
mode:
authorDan O'Reilly <oreilldf@gmail.com>2015-08-26 20:30:41 -0400
committerDan O'Reilly <oreilldf@gmail.com>2015-08-31 16:42:31 -0400
commitd9598ca55db13bcbc8c748ed7a517f12a069962a (patch)
treef836b2757cb6e5cd223827ffceeff2c24eb87f06 /travis.sh
parent0087da9d4775f79c67362cc89c653f3a33a9bae2 (diff)
downloadprotobuf-d9598ca55db13bcbc8c748ed7a517f12a069962a.tar.gz
protobuf-d9598ca55db13bcbc8c748ed7a517f12a069962a.tar.bz2
protobuf-d9598ca55db13bcbc8c748ed7a517f12a069962a.zip
Fix Python 3.4 cpp implementation
Fixes the ScalarMapContainer/MessageMapContainer implementations on Python 3.4, by dynamically allocating their PyTypeObjects using PyType_FromSpecWithBases, instead of statically allocating them. This is necessary because Python 3.4+ disallows statically allocating a class with a dynamically allocated parent. Signed-off-by: Dan O'Reilly <oreilldf@gmail.com>
Diffstat (limited to 'travis.sh')
-rwxr-xr-xtravis.sh12
1 files changed, 7 insertions, 5 deletions
diff --git a/travis.sh b/travis.sh
index a5208fe3..b4a908dd 100755
--- a/travis.sh
+++ b/travis.sh
@@ -113,12 +113,14 @@ build_javanano_oracle7() {
internal_install_python_deps() {
sudo pip install tox
- # Only install Python2.6 on Linux.
+ # Only install Python2.6/3.x 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
+ sudo apt-get install -y python3.3 python3.3-dev
+ sudo apt-get install -y python3.4 python3.4-dev
fi
}
@@ -127,9 +129,9 @@ build_python() {
internal_build_cpp
internal_install_python_deps
cd python
- # Only test Python 2.6 on Linux
+ # Only test Python 2.6/3.x on Linux
if [ $(uname -s) == "Linux" ]; then
- envlist=py26-python,py27-python
+ envlist=py\{26,27,33,34\}-python
else
envlist=py27-python
fi
@@ -143,9 +145,9 @@ build_python_cpp() {
export LD_LIBRARY_PATH=../src/.libs # for Linux
export DYLD_LIBRARY_PATH=../src/.libs # for OS X
cd python
- # Only test Python 2.6 on Linux
+ # Only test Python 2.6/3.x on Linux
if [ $(uname -s) == "Linux" ]; then
- envlist=py26-cpp,py27-cpp
+ envlist=py\{26,27,33,34\}-cpp
else
envlist=py27-cpp
fi