mirror of
https://github.com/esphome/esphome.git
synced 2024-11-23 23:48:11 +01:00
38c25dec93
Co-authored-by: Keith Burzinski <kbx81x@gmail.com>
26 lines
734 B
Bash
Executable file
26 lines
734 B
Bash
Executable file
#!/usr/bin/env bash
|
|
# Set up ESPHome dev environment
|
|
|
|
set -e
|
|
|
|
cd "$(dirname "$0")/.."
|
|
location="venv/bin/activate"
|
|
if [ ! -n "$DEVCONTAINER" ] && [ ! -n "$VIRTUAL_ENV" ] && [ ! "$ESPHOME_NO_VENV" ]; then
|
|
python3 -m venv venv
|
|
if [ -f venv/Scripts/activate ]; then
|
|
location="venv/Scripts/activate"
|
|
fi
|
|
source $location
|
|
fi
|
|
|
|
pip3 install -r requirements.txt -r requirements_optional.txt -r requirements_test.txt -r requirements_dev.txt
|
|
pip3 install setuptools wheel
|
|
pip3 install -e ".[dev,test,displays]" --config-settings editable_mode=compat
|
|
|
|
pre-commit install
|
|
|
|
script/platformio_install_deps.py platformio.ini --libraries --tools --platforms
|
|
|
|
echo
|
|
echo
|
|
echo "Virtual environment created. Run 'source $location' to use it."
|