mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Ensure our venv uses the correct python interpreter, even if the user has set a different version using update-alternatives or similar. Partially fixes #6279
This commit is contained in:
parent
7d3903463c
commit
059dad747d
@ -211,5 +211,13 @@ _copy_code() {
|
||||
# Web setup script
|
||||
mkdir -p "${WEBROOT}/usr/${APP_NAME}/bin/"
|
||||
cp "${SOURCEDIR}/pkg/linux/setup-web.sh" "${WEBROOT}/usr/${APP_NAME}/bin/"
|
||||
|
||||
# Ensure our venv will use the correct Python interpretor, even if the
|
||||
# user has configured an alternative default.
|
||||
# DO THIS LAST!
|
||||
cd "${SERVERROOT}/usr/${APP_NAME}/venv/bin"
|
||||
PYTHON_INTERPRETER=$(/usr/bin/python3 -c "import os, sys; print(os.path.realpath(sys.executable))")
|
||||
rm python && ln -s python3 python
|
||||
rm python3 && ln -s "${PYTHON_INTERPRETER}" python3
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user