Skip to content
Snippets Groups Projects
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
No related branches found
No related tags found
No related merge requests found
...@@ -607,6 +607,17 @@ variables: ...@@ -607,6 +607,17 @@ variables:
fi 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() { function guess_build_system() {
_start_time=$(get_current_ts_ms) _start_time=$(get_current_ts_ms)
...@@ -1090,6 +1101,7 @@ stages: ...@@ -1090,6 +1101,7 @@ stages:
before_script: before_script:
- !reference [.python-scripts] - !reference [.python-scripts]
- install_ca_certs "${CUSTOM_CA_CERTS:-$DEFAULT_CA_CERTS}" - install_ca_certs "${CUSTOM_CA_CERTS:-$DEFAULT_CA_CERTS}"
- enforce_python_cmd
- cd ${PYTHON_PROJECT_DIR} - cd ${PYTHON_PROJECT_DIR}
- guess_build_system - guess_build_system
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment