-
Notifications
You must be signed in to change notification settings - Fork 78
Open
Description
Right now, the pipx and most recent release of problemtools won't work with Kattis, so we need to use older versions. The home page doesn't describe a way of doing so.
I've been pursuing the third supported way: Method 3: Running directly from the repository. However, it assumes that I have a virtualenv in ~/venv. The patch below fixes this:
diff --git a/bin/.run_in_venv.sh b/bin/.run_in_venv.sh
index dce93af..1f9746f 100755
--- a/bin/.run_in_venv.sh
+++ b/bin/.run_in_venv.sh
@@ -3,7 +3,11 @@
# Helper script for the other wrapper scripts to check that a venv exists, or
# give a helpful message if it doesn't.
-VENVPATH="$(dirname "$(dirname "$(readlink -f "$0")")")/venv"
+if [ -d "$VIRTUAL_ENV" ]; then
+ VENVPATH="$VIRTUAL_ENV"
+else
+ VENVPATH="$(dirname "$(dirname "$(readlink -f "$0")")")/venv"
+fi
if [ ! -x "$VENVPATH/bin/python" ]; then
echo "I could not find a python venv at $VENVPATH."Metadata
Metadata
Assignees
Labels
No labels