Skip to content

Commit

Permalink
Merge pull request #267 from vespa-engine/aressem/configure-python
Browse files Browse the repository at this point in the history
Make sure that python3 is the newest installed one by default
  • Loading branch information
aressem authored Feb 20, 2025
2 parents e52aaa3 + d9a2e4a commit b395521
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
4 changes: 4 additions & 0 deletions build/almalinux-8/include/install-build-dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,10 @@ tar zxvf v${ATHENZ_VERSION}.tar.gz
)
rm -rf v${ATHENZ_VERSION}.tar.gz athenz-${ATHENZ_VERSION} /root/go

# Set default python to the newes installed and make sure it has pip
PYBIN="$(ls /usr/bin/python3* | grep -E "/usr/bin/python3.[0-9]+$" |sort -n -k2 -t.|tail -1)"
alternatives --set python3 "$PYBIN"
dnf install -y "$(basename "$PYBIN")"-pip

# Add factory command
curl -L -o /usr/local/bin/factory-command "https://raw.githubusercontent.com/vespa-engine/vespa/refs/heads/master/.buildkite/factory-command.sh"
Expand Down
5 changes: 5 additions & 0 deletions build/almalinux-9/include/install-build-dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,11 @@ else
dnf install -y "https://github.com/aquasecurity/trivy/releases/download/v${TRIVY_VERSION}/trivy_${TRIVY_VERSION}_Linux-ARM64.rpm"
fi

# Set default python to the newes installed and make sure it has pip
PYBIN="$(ls /usr/bin/python3* | grep -E "/usr/bin/python3.[0-9]+$" |sort -n -k2 -t.|tail -1)"
alternatives --set python3 "$PYBIN" || true # If the newest/default is not set via alternatives this is ok
dnf install -y "$(basename "$PYBIN")"-pip

# Add factory command
curl -L -o /usr/local/bin/factory-command "https://raw.githubusercontent.com/vespa-engine/vespa/refs/heads/master/.buildkite/factory-command.sh"
chmod 755 /usr/local/bin/factory-command
Expand Down

0 comments on commit b395521

Please sign in to comment.