@@ -43,6 +43,7 @@ USE_CLANG="${USE_CLANG:-false}"
43
43
export INSTALL_PREFIX=${INSTALL_PREFIX:- " /usr/local" }
44
44
DEPENDENCY_DIR=${DEPENDENCY_DIR:- $(pwd)/ deps-download}
45
45
VERSION=$( cat /etc/os-release | grep VERSION_ID)
46
+ PYTHON_VENV=${PYTHON_VENV:- " ${SCRIPTDIR} /../.venv" }
46
47
47
48
# On Ubuntu 20.04 dependencies need to be built using gcc11.
48
49
# On Ubuntu 22.04 gcc11 is already the system gcc installed.
@@ -94,7 +95,12 @@ function install_build_prerequisites {
94
95
git \
95
96
pkg-config \
96
97
wget
97
-
98
+
99
+ if [ ! -f ${PYTHON_VENV} /pyvenv.cfg ]; then
100
+ echo " Creating Python Virtual Environment at ${PYTHON_VENV} "
101
+ python3 -m venv ${PYTHON_VENV}
102
+ fi
103
+ source ${PYTHON_VENV} /bin/activate;
98
104
# Install to /usr/local to make it available to all users.
99
105
${SUDO} pip3 install cmake==3.28.3
100
106
@@ -106,6 +112,14 @@ function install_build_prerequisites {
106
112
107
113
}
108
114
115
+ # Install packages required to fix format
116
+ function install_format_prerequisites {
117
+ pip3 install regex
118
+ ${SUDO} apt install -y \
119
+ clang-format \
120
+ cmake-format
121
+ }
122
+
109
123
# Install packages required for build.
110
124
function install_velox_deps_from_apt {
111
125
${SUDO} apt update
@@ -287,6 +301,7 @@ function install_velox_deps {
287
301
288
302
function install_apt_deps {
289
303
install_build_prerequisites
304
+ install_format_prerequisites
290
305
install_velox_deps_from_apt
291
306
}
292
307
0 commit comments