feat: add support for poetry
Poetry will be used for tracking python package dependencies. Utilise
poetry when running scripts. Ensure that the internal CI has access to
to the package.
Signed-off-by: Harrison Mutai <harrison.mutai@arm.com>
Change-Id: I3b0991f4fdadc678b50a6bfdce1b374a7e524c2b
diff --git a/script/build_package.sh b/script/build_package.sh
index 3377065..c527475 100755
--- a/script/build_package.sh
+++ b/script/build_package.sh
@@ -540,7 +540,7 @@
# Build TF. Since build output is being directed to the build log, have
# descriptor 3 point to the current terminal for build wrappers to vent.
- $tf_build_wrapper make $make_j_opts $(cat "$config_file") \
+ $tf_build_wrapper poetry run make $make_j_opts $(cat "$config_file") \
DEBUG="$DEBUG" V=1 SPIN_ON_BL1_EXIT="$connect_debugger" \
$build_targets 3>&1 &>>"$build_log" || fail_build
)
@@ -1448,7 +1448,12 @@
source "$plat_utils"
fi
- source "$ci_root/script/install_python_deps_tf.sh"
+ # Install python build dependencies
+ if is_arm_jenkins_env; then
+ source "$ci_root/script/install_python_deps_tf.sh"
+ fi
+
+ poetry -C "$tf_root" install --without doc
archive="$build_archive"
tf_build_root="$tf_root/build"
diff --git a/script/install_python_deps_tf.sh b/script/install_python_deps_tf.sh
index 242458e..c0cf774 100644
--- a/script/install_python_deps_tf.sh
+++ b/script/install_python_deps_tf.sh
@@ -18,7 +18,6 @@
export PIP_CACHE_DIR=${project_filer}/pip-cache
python3 -m pip install --upgrade pip
- python3 -m pip install -r "${tf_root}/docs/requirements.txt" ||
- python3 -m pip install -r "${tf_root}/docs/requirements.txt" \
- --no-cache-dir # Avoid cache concurrency issues
+ python3 -m pip install poetry==1.3.2 ||
+ python3 -m pip install poetry==1.3.2 --no-cache-dir
)