android_external_mesa3d/meson_to_hermetic/setup-venv.sh
= c6cc3b175f meson-to-hermetic: Rename meson-to-hermetic to -> meson_to_hermetic
Python packages does not allow for the use of hyphen as it's a reserved token.
This change needs to be made to be imported by unit-tests in the future

This change will require a new venv to be generated locally:
`$ rm -rf venv`
`$ ./setup-venv.sh`
`$ source venv/bin/activate`

Test: Run meson_to_hermetic/build-android/fuchsia-turnip.sh
Bug: 360173803
Change-Id: Ie6fab4689ef5fc985e15747b0c06bfae662c387c
2024-08-26 22:13:07 +00:00

16 lines
538 B
Bash
Executable file

#!/bin/bash
if [ -d "venv" ]; then
echo "A venv folder already exists in this project!"
exit 0
fi
if command -v python3 >/dev/null 2>&1; then
echo "Currently creating a python virtual environment..."
python3 -m venv venv
source venv/bin/activate
echo "Done creating new venv folder and terminal is now using venv."
echo "Now attempting to install dependencies..."
pip install -r requirements.txt
echo "Successfully finished installing dependencies!"
else
echo "Python 3 is not currently installed on your machine!"
fi