Fix array to pipy (#354)

* Fix array to pipy

* Update CHANGELOG.md

* Update run.sh
This commit is contained in:
Pascal Vizeli
2018-07-11 14:16:59 +02:00
committed by GitHub
parent f4addb27ce
commit c0410a8d59
3 changed files with 9 additions and 4 deletions

View File

@@ -1,5 +1,8 @@
# Changelog
## 0.3
- Bugfix multible pip packages
## 0.2
- Bugfix pip prefix settings

View File

@@ -1,6 +1,6 @@
{
"name": "Custom deps deployment",
"version": "0.2",
"version": "0.3",
"slug": "custom_deps",
"description": "Manage custom python modules in Home Assistant deps",
"url": "https://home-assistant.io/addons/custom_deps/",

View File

@@ -3,8 +3,8 @@ set -e
CONFIG_PATH=/data/options.json
PYPI=$(jq --raw-output ".pypi[]" $CONFIG_PATH)
APK=$(jq --raw-output ".apk[] // empty" $CONFIG_PATH)
PYPI="$(jq --raw-output '.pypi | join(" ")' $CONFIG_PATH)"
APK="$(jq --raw-output '.apk | join(" ") // empty' $CONFIG_PATH)"
# Cleanup old deps
echo "[Info] Remove old deps"
@@ -22,7 +22,9 @@ fi
# Install pypi modules
echo "[Info] Install pypi modules into deps"
export PYTHONUSERBASE=/config/deps
if ! ERROR="$(pip3 install --user --no-cache-dir --prefix= --no-dependencies "${PYPI[@]}")"; then
# shellcheck disable=SC2086
if ! ERROR="$(pip3 install --user --no-cache-dir --prefix= --no-dependencies $PYPI)"; then
echo "[Error] Can't install pypi packages!"
echo "$ERROR" && exit 1
fi