This is an automated email from the ASF dual-hosted git repository.

jdanek pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/qpid-dispatch.git

commit 44f40b8959c72566e88bfd3da44c203d15c288de
Author: Jiri Danek <[email protected]>
AuthorDate: Wed Oct 16 20:24:25 2019 +0200

    DISPATCH-1282 - Use Python3 from MacPorts in Travis when on macOS
---
 .travis.yml | 21 +++++++++++++--------
 1 file changed, 13 insertions(+), 8 deletions(-)

diff --git a/.travis.yml b/.travis.yml
index a50402a..f7d0170 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -25,24 +25,30 @@ matrix:
   allow_failures:
     - os: osx
   include:
+  # prepending /usr/bin to PATH to avoid mismatched python interpreters in /opt
   - os: linux
     env:
-    - PROTON_VERSION=master BUILD_TYPE=Debug
+    - PATH="/usr/bin:$PATH" PROTON_VERSION=master BUILD_TYPE=Debug
   - os: linux
     env:
-    - PROTON_VERSION=0.29.0 BUILD_TYPE=Coverage
+    - PATH="/usr/bin:$PATH" PROTON_VERSION=0.29.0 BUILD_TYPE=Coverage
   - os: linux
     env:
-    - PROTON_VERSION=0.29.0 BUILD_TYPE=RelWithDebInfo
+    - PATH="/usr/bin:$PATH" PROTON_VERSION=0.29.0 BUILD_TYPE=RelWithDebInfo
   - os: osx
     osx_image: xcode10.1
     env:
-    - 
PATH="/opt/local/bin:/opt/local/sbin:/usr/local/opt/python/libexec/bin:/usr/local/bin:$PATH"
 PROTON_VERSION=master
+    - PATH="/opt/local/bin:/opt/local/sbin:/usr/local/bin:$PATH" 
PROTON_VERSION=master
     before_install:
-    - sudo /usr/bin/python -m easy_install unittest2
     - bash ./macports.sh
     - export COLUMNS=80
-    - yes | sudo port install swig swig-python libuv jsoncpp cyrus-sasl2 
pkgconfig
+    - yes | sudo port install cmake swig swig-python libuv jsoncpp 
libwebsockets cyrus-sasl2 pkgconfig python37 py37-pip
+    # set aliases for CMake's PythonInterp and PythonLibs to find MacPort's 
`python` on the path first
+    - sudo port select --set python python37
+    - sudo port select --set python3 python37
+    - python -m venv p3venv
+    - source p3venv/bin/activate
+    - pip install unittest2
 
 addons:
   apt:
@@ -74,7 +80,6 @@ install:
 # Build and install proton from source.
 - mkdir qpid-proton/build
 - pushd qpid-proton/build
-- export PATH="/usr/bin:$PATH" # Avoid mismatched python interpreters in /opt
 - cmake .. -DCMAKE_INSTALL_PREFIX=$PREFIX -DBUILD_PYTHON=YES 
-DBUILD_JAVASCRIPT=NO -DBUILD_CPP=NO -DBUILD_GO=NO -DBUILD_RUBY=NO 
-DBUILD_PHP=NO -DBUILD_PERL=NO
 - cmake --build . --target install -- -j $NPROC
 - popd
@@ -91,7 +96,7 @@ script:
 - echo $(echo "Current proton commit:") $(git rev-parse HEAD) 
"(${PROTON_VERSION})"
 - popd
 # Workaround on macOS for PROTON-808 Binaries have their library locations 
stripped
-- if [[ "$OSTYPE" == "darwin"* ]]; then install_name_tool -add_rpath 
$PREFIX/lib/. $PREFIX/lib/proton/bindings/python/_cproton.so; fi
+- if [[ "${OSTYPE}" == "darwin"* ]]; then install_name_tool -add_rpath 
$PREFIX/lib/. $PREFIX/lib/proton/bindings/python/_cproton.so; fi
 - ctest -V && if [ "$BUILD_TYPE" = "Coverage" ]; then cmake --build . --target 
coverage; fi
 - popd
 - mvn apache-rat:check


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to