Skip to content

Commit

Permalink
v6.34
Browse files Browse the repository at this point in the history
+ DietPi-Software | Home Assistant: Error handle pyenv install
  • Loading branch information
MichaIng authored Nov 23, 2020
1 parent 52ebef5 commit 5002276
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions dietpi/dietpi-software
Original file line number Diff line number Diff line change
Expand Up @@ -6321,24 +6321,24 @@ If you want to update ${aSOFTWARE_NAME[$software_id]}, please use its internal u

# Generate script to activate pyenv: This must be sourced from the originating shell, hence it does not require execute permissions.
echo "#!/bin/dash
if [ \$(whoami) != $ha_user ]; then
if [ \$(whoami) != '$ha_user' ]; then
echo '[FAILED] This pyenv must be activated as user \"$ha_user\". Aborting...'
kill -INT \$\$
fi
cd $ha_home
export PATH=\"$ha_home/.pyenv/bin:\$PATH\"
eval \"\$(pyenv init -)\"" > $ha_home/pyenv-activate.sh

# Install Python with Home Assistant module into pyenv
G_EXEC_DESC='Installing Python with Home Assistant module into pyenv'
# - Read custom Python modules
local custom_pip_deps=$(sed -n '/^[[:blank:]]*SOFTWARE_HOMEASSISTANT_PIP_DEPS=/{s/^[^=]*=//p;q}' /boot/dietpi.txt)
# - MariaDB support: pip3 install mysqlclient|PyMySQL
sudo -u $ha_user dash -c "
G_EXEC_OUTPUT=1 G_EXEC sudo -u $ha_user dash -c "
$ha_pyenv_activation
pyenv install $ha_python_version
pyenv local $ha_python_version
pip3 install -U pip wheel
[ -z \"$custom_pip_deps\" ] || pip3 install $custom_pip_deps
[ -z '$custom_pip_deps' ] || pip3 install $custom_pip_deps
exec pip3 install homeassistant"

# Generate script to launch HA using pyenv
Expand Down

0 comments on commit 5002276

Please sign in to comment.