From d816f2011306367f07c4a685f8d645f6f10e2cf7 Mon Sep 17 00:00:00 2001 From: Ankita Victor Date: Mon, 25 Nov 2024 15:46:08 +0530 Subject: [PATCH 1/2] Install regex, cmake-format, clang-format --- scripts/setup-ubuntu.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/scripts/setup-ubuntu.sh b/scripts/setup-ubuntu.sh index 3d502547a7f6..5cf09a491249 100755 --- a/scripts/setup-ubuntu.sh +++ b/scripts/setup-ubuntu.sh @@ -105,6 +105,14 @@ function install_build_prerequisites { } +# Install packages required to fix format +function install_format_prerequisites { + pip3 install regex + ${SUDO} apt install -y \ + clang-format \ + cmake-format +} + # Install packages required for build. function install_velox_deps_from_apt { ${SUDO} apt update @@ -286,6 +294,7 @@ function install_velox_deps { function install_apt_deps { install_build_prerequisites + install_format_prerequisites install_velox_deps_from_apt } From 5e491a87d3dd1140ba715b0a3144ac9b58431393 Mon Sep 17 00:00:00 2001 From: Ankita Victor Date: Thu, 12 Dec 2024 17:04:02 +0530 Subject: [PATCH 2/2] Use venv --- scripts/setup-ubuntu.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/scripts/setup-ubuntu.sh b/scripts/setup-ubuntu.sh index 5cf09a491249..adc75b417b4f 100755 --- a/scripts/setup-ubuntu.sh +++ b/scripts/setup-ubuntu.sh @@ -42,6 +42,7 @@ USE_CLANG="${USE_CLANG:-false}" export INSTALL_PREFIX=${INSTALL_PREFIX:-"/usr/local"} DEPENDENCY_DIR=${DEPENDENCY_DIR:-$(pwd)/deps-download} VERSION=$(cat /etc/os-release | grep VERSION_ID) +PYTHON_VENV=${PYTHON_VENV:-"${SCRIPTDIR}/../.venv"} # On Ubuntu 20.04 dependencies need to be built using gcc11. # On Ubuntu 22.04 gcc11 is already the system gcc installed. @@ -93,7 +94,12 @@ function install_build_prerequisites { git \ pkg-config \ wget - + + if [ ! -f ${PYTHON_VENV}/pyvenv.cfg ]; then + echo "Creating Python Virtual Environment at ${PYTHON_VENV}" + python3 -m venv ${PYTHON_VENV} + fi + source ${PYTHON_VENV}/bin/activate; # Install to /usr/local to make it available to all users. ${SUDO} pip3 install cmake==3.28.3