-
Notifications
You must be signed in to change notification settings - Fork 203
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: added virtual environment for python on darwin/ubuntu
This commit made with the assistance of github copilot Signed-off-by: Morgan Rockett <[email protected]>
- Loading branch information
Showing
8 changed files
with
224 additions
and
17 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,5 @@ | ||
setuptools | ||
eth-hash | ||
matplotlib | ||
numpy | ||
pylint |
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,26 @@ | ||
#!/bin/bash | ||
|
||
# run with 'source scripts/activate-venv.sh' | ||
set -e | ||
|
||
ROOT="$(cd "$(dirname "$0")"/.. && pwd)" | ||
ENV_NAME=".py_venv" | ||
|
||
# if venv does not exist, send error message and exit | ||
if [ ! -d "${ROOT}/${ENV_NAME}" ]; then | ||
echo "Virtual environment '${ENV_NAME}' not found." | ||
if [[ $OSTYPE == "linux-gnu"* ]]; then | ||
echo "run 'sudo ./scripts/install-build-tools.sh' to create it." | ||
elif [[ $OSTYPE == "darwin"* ]]; then | ||
echo "run './scripts/install-build-tools.sh' to create it." | ||
fi | ||
exit 1 | ||
fi | ||
|
||
# activate virtual environment | ||
if source "${ROOT}/${ENV_NAME}/bin/activate"; then | ||
echo "Virtual environment '${ENV_NAME}' activated." | ||
echo "Run 'deactivate' to exit the virtual environment." | ||
else | ||
echo "Failed to activate virtual environment '${ENV_NAME}'." | ||
fi |
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
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
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