2019-10-12 14:03:35 +01:00
|
|
|
#!/bin/bash
|
2019-04-17 11:06:00 +01:00
|
|
|
# Set up ESPHome dev environment
|
|
|
|
|
|
|
|
set -e
|
|
|
|
|
|
|
|
cd "$(dirname "$0")/.."
|
2023-04-03 20:44:46 +01:00
|
|
|
|
2023-06-21 05:36:54 +01:00
|
|
|
if [ ! -n "$DEVCONTAINER" ] && [ ! -n "$VIRTUAL_ENV" ] && [ ! "$ESPHOME_NO_VENV" ]; then
|
2023-04-03 20:44:46 +01:00
|
|
|
python3 -m venv venv
|
|
|
|
source venv/bin/activate
|
|
|
|
fi
|
|
|
|
|
2023-07-16 22:19:08 +01:00
|
|
|
# Avoid unsafe git error when running inside devcontainer
|
|
|
|
if [ -n "$DEVCONTAINER" ];then
|
|
|
|
git config --global --add safe.directory "$PWD"
|
|
|
|
fi
|
|
|
|
|
2021-06-08 21:03:04 +01:00
|
|
|
pip3 install -r requirements.txt -r requirements_optional.txt -r requirements_test.txt
|
2023-06-21 05:36:54 +01:00
|
|
|
pip3 install setuptools wheel
|
2022-01-03 09:11:28 +00:00
|
|
|
pip3 install --no-use-pep517 -e .
|
2021-03-07 19:03:16 +00:00
|
|
|
|
|
|
|
pre-commit install
|
2023-04-27 01:26:06 +01:00
|
|
|
|
2023-05-01 04:57:57 +01:00
|
|
|
script/platformio_install_deps.py platformio.ini --libraries --tools --platforms
|