Skip to content

Commit

Permalink
Scripts updated.
Browse files Browse the repository at this point in the history
  • Loading branch information
Hoyt Koepke committed May 17, 2024
1 parent 8c5086f commit 411eee3
Showing 1 changed file with 16 additions and 17 deletions.
33 changes: 16 additions & 17 deletions python/pyxet/scripts/setup_env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,27 +17,26 @@ venv_activate_script() {
}

create_venv() {
if [[ -z "$VIRTUAL_ENV" ]] ; then
venv_name=$1

python_executable=$(./scripts/find_python.sh $2)
venv_name=$1

python_executable=$(./scripts/find_python.sh $2)

if [[ ! -e pyproject.toml ]] ; then
>&2 echo "Run this script in the pyxet directory using ./scripts/$0"
exit 1
fi
if [[ ! -e pyproject.toml ]] ; then
>&2 echo "Run this script in the pyxet directory using ./scripts/$0"
exit 1
fi

if [[ ! -e ./$venv_name ]] ; then
>&2 echo "Setting up virtual environment."
>&2 echo "Python version = $($python_executable--version)"
>&2 $python_executable -m venv ./$venv_name
if [[ ! -e ./$venv_name ]] ; then
>&2 echo "Setting up virtual environment."
>&2 echo "Python version = $($python_executable --version)"
>&2 $python_executable -m venv ./$venv_name

[[ -e "./$venv_name" ]] || exit 1
[[ -e "./$venv_name" ]] || exit 1

source $(venv_activate_script $venv_name)
source $(venv_activate_script $venv_name)

>&2 pip install --upgrade pip
>&2 pip install -r scripts/dev_requirements.txt
fi
fi
>&2 pip install --upgrade pip
>&2 pip install -r scripts/dev_requirements.txt
fi
}

0 comments on commit 411eee3

Please sign in to comment.