-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Loading status checks…
Merge pull request #54 from rc10house/52-cross-version-testing
chore(testing): Installed tox for python versions 3.8 to 3.11
- Loading branch information
Showing
5 changed files
with
882 additions
and
687 deletions.
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
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,35 @@ | ||
#!/bin/bash | ||
|
||
install_python_versions() { | ||
versions=("3.8" "3.9" "3.10" "3.11") | ||
for version in "${versions[@]}"; do | ||
echo "--------------------------------------------------" | ||
echo "Installing python $version" | ||
echo "--------------------------------------------------" | ||
pyenv install -s "$version" | ||
pyenv local "$version" | ||
done | ||
} | ||
|
||
# Install pyenv | ||
if which pyenv; then | ||
install_python_versions | ||
else | ||
echo "Trying to install pyenv for you." | ||
curl https://pyenv.run | bash | ||
|
||
user_shell="$SHELL" | ||
|
||
if echo "$user_shell" | grep -q "bash"; then | ||
rc_file="$HOME/.bashrc" | ||
elif echo "$user_shell" | grep -q "zsh"; then | ||
rc_file="$HOME/.zshrc" | ||
elif echo "$user_shell" | grep -q "fish"; then | ||
rc_file="$HOME/.config/fish/config.fish" | ||
else | ||
echo "Unsupported shell: $user_shell" | ||
exit 1 | ||
fi | ||
|
||
install_python_versions | ||
fi |
Oops, something went wrong.