Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: Install packages and modules for format #11649

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 16 additions & 1 deletion scripts/setup-ubuntu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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

Expand All @@ -105,6 +111,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
Expand Down Expand Up @@ -286,6 +300,7 @@ function install_velox_deps {

function install_apt_deps {
install_build_prerequisites
install_format_prerequisites
install_velox_deps_from_apt
}

Expand Down
Loading