SRCDIR="src/lttng-analyses"
PYTHON3="python3"
-P3_VERSION=$($PYTHON3 -c "import sys;print(sys.version[:3])")
+P3_VERSION=$($PYTHON3 -c 'import sys;v = sys.version.split()[0].split("."); print("{}.{}".format(v[0], v[1]))')
BABELTRACE_DIR=$WORKSPACE/deps/babeltrace/build
SRCDIR="src/lttng-analyses"
PYTHON3="python3"
-P3_VERSION=$($PYTHON3 -c "import sys;print(sys.version[:3])")
+P3_VERSION=$($PYTHON3 -c 'import sys;v = sys.version.split()[0].split("."); print("{}.{}".format(v[0], v[1]))')
BABELTRACE_DIR=$WORKSPACE/deps/babeltrace/build
# along with this program. If not, see <http://www.gnu.org/licenses/>.
PYTHON3="python3"
-P3_VERSION=$($PYTHON3 -c "import sys;print(sys.version[:3])")
+P3_VERSION=$($PYTHON3 -c 'import sys;v = sys.version.split()[0].split("."); print("{}.{}".format(v[0], v[1]))')
# Tox does not support long path venv for whatever reason.
PYENV_HOME=$(mktemp -d)
PYTHON2=python2
PYTHON3=python3
- P2_VERSION=$($PYTHON2 -c "import sys;print(sys.version[:3])")
- P3_VERSION=$($PYTHON3 -c "import sys;print(sys.version[:3])")
+ P2_VERSION=$($PYTHON2 -c 'import sys;v = sys.version.split()[0].split("."); print("{}.{}".format(v[0], v[1]))')
+ P3_VERSION=$($PYTHON3 -c 'import sys;v = sys.version.split()[0].split("."); print("{}.{}".format(v[0], v[1]))')
DEPS_PYTHON2="$WORKSPACE/deps/build/lib/python$P2_VERSION/site-packages"
DEPS_PYTHON3="$WORKSPACE/deps/build/lib/python$P3_VERSION/site-packages"
export PYTHON="$PYTHON3"
export PYTHON_CONFIG="/usr/bin/$PYTHON3-config"
-P2_VERSION=$($PYTHON2 -c "import sys;print(sys.version[:3])")
-P3_VERSION=$($PYTHON3 -c "import sys;print(sys.version[:3])")
+P2_VERSION=$($PYTHON2 -c 'import sys;v = sys.version.split()[0].split("."); print("{}.{}".format(v[0], v[1]))')
+P3_VERSION=$($PYTHON3 -c 'import sys;v = sys.version.split()[0].split("."); print("{}.{}".format(v[0], v[1]))')
UST_PYTHON2="$WORKSPACE/deps/build/lib/python$P2_VERSION/site-packages"
UST_PYTHON3="$WORKSPACE/deps/build/lib/python$P3_VERSION/site-packages"
mkdir -p "$WORKSPACE/build"
PYTHON3=python3
-P3_VERSION=$($PYTHON3 -c "import sys;print(sys.version[:3])")
+P3_VERSION=$($PYTHON3 -c 'import sys;v = sys.version.split()[0].split("."); print("{}.{}".format(v[0], v[1]))')
# liburcu
URCU_INCS="$WORKSPACE/deps/liburcu/build/include/"