Skip to content

Commit

Permalink
meta: Improved how ./ck looks for python.
Browse files Browse the repository at this point in the history
  • Loading branch information
sleepy-monax committed Sep 20, 2024
1 parent 65fd403 commit aa69f58
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion ck
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,14 @@ function is_darwin() {
return 1
}

if [ -z "$CUTEKIT_PYTHON" ]; then
if command -v python3.11 &> /dev/null; then
export CUTEKIT_PYTHON="python3.11"
else
export CUTEKIT_PYTHON="python3"
fi
fi

if [ "$EUID" -eq 0 ]; then
echo "Please do not run this script as root."

Expand Down Expand Up @@ -65,7 +73,7 @@ if [ ! -f .cutekit/tools-ready ]; then
mkdir -p .cutekit
if [ ! -d .cutekit/venv ]; then
echo "Setting up Python virtual environment..."
python3.11 -m venv .cutekit/venv
$CUTEKIT_PYTHON -m venv .cutekit/venv
fi
source .cutekit/venv/bin/activate

Expand Down

0 comments on commit aa69f58

Please sign in to comment.