#!/bin/sh
# SPDX-License-Identifier: LGPL-2.1-or-later
set -e

if [ "$1" = "build" ]; then
    . /etc/os-release

    if [ "$ID" = "centos" ] && [ "$VERSION" = "8" ]; then
        alternatives --install /usr/bin/python3 python3 /usr/bin/python3.9 1
        alternatives --set python3 /usr/bin/python3.9
    fi
fi
