blob: 18b34a72bd0f9dd93906bcb0bf2ed4f6257d5706 [file] [log] [blame]
#! /bin/bash
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# Source this file to set up environment variables for the Qpid interop tests.
export QIT_INSTALL_PREFIX=@CMAKE_INSTALL_PREFIX@
# Set PYTHON2PATH and PYTHON3PATH for respective python shims
unset PYTHON2PATH
py2_found_str="@PYTHON2_FOUND@"
if [[ "${py2_found_str#*-}" == "NOTFOUND" ]]; then
echo "No Python 2.x found, Python 2 shims disabled"
else
export PYTHON2PATH=@CMAKE_INSTALL_PREFIX@/lib64/proton/bindings/python:@CMAKE_INSTALL_PREFIX@/lib/@PYTHON2_SITE_DIR_NAME@/site-packages:@CMAKE_INSTALL_PREFIX@/libexec/qpid_interop_test/shims/qpid-proton-python
fi
unset PYTHON3PATH
py3_found_str="@PYTHON3_FOUND@"
if [[ "${py3_found_str#*-}" == "NOTFOUND" ]]; then
echo "No Python 3.x found, Python 3 shims disabled"
else
export PYTHON3PATH=@CMAKE_INSTALL_PREFIX@/lib64/proton/bindings/python3:@CMAKE_INSTALL_PREFIX@/lib/@PYTHON3_SITE_DIR_NAME@/site-packages:@CMAKE_INSTALL_PREFIX@/libexec/qpid_interop_test/shims/qpid-proton-python
fi
# To run the main program use python 2
export PYTHONPATH=$PYTHON2PATH
export LD_LIBRARY_PATH=@CMAKE_INSTALL_PREFIX@/lib64:$LD_LIBRARY_PATH
export PATH=@CMAKE_INSTALL_PREFIX@/lib/@PYTHON_DIR_NAME@/site-packages/qpid_interop_test:$PATH