-
-
Notifications
You must be signed in to change notification settings - Fork 194
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
31 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
set -e | ||
|
||
# Ensure pyenv is initialized | ||
if command -v pyenv >/dev/null; then | ||
eval "$(pyenv init -)" | ||
fi | ||
# Set the local Python version | ||
if ! pyenv local $(cat .python-version); then | ||
log_error "Failed to activate pyenv version $(cat .python-version)." | ||
log_error "Please ensure pyenv works and has the required python version:" | ||
log_error "# pyenv install $(cat .python-version) && direnv allow" | ||
exit 1 | ||
fi | ||
# Create a virtual environment if it doesn't exist | ||
if [ ! -d ".venv" ]; then | ||
python -m venv .venv | ||
echo "Created virtual environment in .venv" | ||
fi | ||
# Activate the virtual environment | ||
source .venv/bin/activate |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -56,4 +56,4 @@ voxometadata/secrets | |
# Env vars | ||
.env | ||
|
||
.python-version | ||
.venv |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
3.8.12 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters