diff --git a/build-scripts/requirements.sh b/build-scripts/requirements.sh index e4abf7b4508e..45b5cd564e47 100644 --- a/build-scripts/requirements.sh +++ b/build-scripts/requirements.sh @@ -14,13 +14,19 @@ if [[ "$LIBBACKTRACE" == "1" ]]; then ) fi +# needed for newer ubuntu versions +# https://stackoverflow.com/questions/75608323/how-do-i-solve-error-externally-managed-environment-every-time-i-use-pip-3 +if [[ $(bc <<< "$(lsb_release -rs) > 22.04") -eq 1 ]]; then + PIP_FLAGS="--break-system-packages" +fi + if [ -n "$CATA_CLANG_TIDY" ]; then - pip install --user wheel - pip install --user 'lit==0.11.1' 'click==7.1.2' + pip install --user wheel --upgrade "$PIP_FLAGS" + pip install --user 'lit==0.11.1' 'click==7.1.2' "$PIP_FLAGS" fi if [ -n "$LANGUAGES" ]; then - pip install --user polib luaparser --break-system-packages + pip install --user polib luaparser "$PIP_FLAGS" fi # Influenced by https://github.com/zer0main/battleship/blob/master/build/windows/requirements.sh