Commit e6c8d7f9 authored by Gaëtan Montury's avatar Gaëtan Montury Committed by Pierre Smeyers
Browse files

fix: add python cmd when python3 is present

parent 78b35c84
Loading
Loading
Loading
Loading
+12 −0
Original line number Diff line number Diff line
@@ -607,6 +607,17 @@ variables:
    fi
  }

  function enforce_python_cmd() {
    _p3=$(command -v python3)
    if [[ "$_p3" ]] && ! command -v python > /dev/null
    then
      _p3dir=$(dirname "$_p3")
      ln -s "$_p3" "$_p3dir/python"
      if [ -n "$TRACE" ]; then
        log_info "python3 symlinked to $_p3dir/python"
      fi
    fi
  }
  function guess_build_system() {
    _start_time=$(get_current_ts_ms)

@@ -1090,6 +1101,7 @@ stages:
  before_script:
    - !reference [.python-scripts]
    - install_ca_certs "${CUSTOM_CA_CERTS:-$DEFAULT_CA_CERTS}"
    - enforce_python_cmd
    - cd ${PYTHON_PROJECT_DIR}
    - guess_build_system