lttng-tools: export PYTHONPATH for all build configs
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Wed, 23 Nov 2022 21:26:39 +0000 (16:26 -0500)
committerMichael Jeanson <mjeanson@efficios.com>
Wed, 23 Nov 2022 22:14:19 +0000 (17:14 -0500)
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 <jeremie.galarneau@efficios.com>
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
scripts/lttng-tools/build.sh

index 848f25549e9d81cf6e269d4997ac95b418cb02dd..80d207a02c07a3e9a7cc2a1b51d035e0463fe01d 100755 (executable)
@@ -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")
 
This page took 0.024637 seconds and 4 git commands to generate.