From 89098ef83006b54a091df463a8c7176747a88bee Mon Sep 17 00:00:00 2001 From: Replit user <> Date: Thu, 7 Dec 2023 16:41:03 +0000 Subject: [PATCH] improve install poetry in venv --- install_poetry_in_venv.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/install_poetry_in_venv.sh b/install_poetry_in_venv.sh index e9851408742..4f125a567a8 100755 --- a/install_poetry_in_venv.sh +++ b/install_poetry_in_venv.sh @@ -1,6 +1,9 @@ +# This script installs poetry within its own venv the way +# it is when deployed so that its deps are isolated from the deps of the projects it manages rm -fr poetry_env poetry build python -m venv poetry_env touch poetry_env/poetry_env poetry_env/bin/pip install dist/poetry-1.5.2-py3-none-any.whl -# need to edit poetry_env/bin/poetry shebang line \ No newline at end of file +# inspired by https://stackoverflow.com/a/584926: +sed -i 's@/usr/bin/env python3@'"$REPL_HOME"'/poetry_env/bin/python3@g' poetry_env/bin/poetry \ No newline at end of file