From: Jérémie Galarneau Date: Wed, 23 Nov 2022 21:26:39 +0000 (-0500) Subject: lttng-tools: export PYTHONPATH for all build configs X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=de7e8d557b2547820eac7157521e0e2217c55669;p=lttng-ci.git lttng-tools: export PYTHONPATH for all build configs Following the addition of a new test in LTTng-tools, all builds that have lttng-ust enabled require the babeltrace 2 python bindings. Export PYTHONPATH in all cases, not just the `agents` configuration. Change-Id: Ia433c5f9d26c620aaf7457100c60e48efa77d883 Signed-off-by: Jérémie Galarneau Signed-off-by: Michael Jeanson --- diff --git a/scripts/lttng-tools/build.sh b/scripts/lttng-tools/build.sh index 848f255..80d207a 100755 --- a/scripts/lttng-tools/build.sh +++ b/scripts/lttng-tools/build.sh @@ -255,6 +255,10 @@ cygwin|cygwin64|msys32|msys64) P3_VERSION=$($PYTHON3 -c 'import sys;v = sys.version.split()[0].split("."); print("{}.{}".format(v[0], v[1]))') DEPS_PYTHON3="$WORKSPACE/deps/build/lib/python$P3_VERSION/site-packages" + + # Most build configs require access to the babeltrace 2 python bindings. + # This also makes the lttngust python agent available for `agents` builds. + export PYTHONPATH="${DEPS_PYTHON2:-}${DEPS_PYTHON2:+:}$DEPS_PYTHON3" ;; esac @@ -329,7 +333,6 @@ agents) export JAVA_HOME="/usr/lib/jvm/default-java" export CLASSPATH="$DEPS_JAVA/lttng-ust-agent-all.jar:/usr/share/java/log4j-api.jar:/usr/share/java/log4j-core.jar:/usr/share/java/log4j-1.2.jar" - export PYTHONPATH="${DEPS_PYTHON2:-}${DEPS_PYTHON2:+:}$DEPS_PYTHON3" CONF_OPTS+=("--enable-test-java-agent-all" "--enable-test-python-agent-all")