Skip to content

Commit

Permalink
[homeassistant] fix integrations (#4341)
Browse files Browse the repository at this point in the history
* fix integrations
- add dependencies for xiaomi integrations
- fix playstation 4 integration
- use always alternate temp dir.
- update tlslite-ng to v0.7.6 (closes #4324)
  • Loading branch information
hgy59 authored Dec 30, 2020
1 parent 3c934a6 commit 4d89923
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 12 deletions.
4 changes: 2 additions & 2 deletions spk/homeassistant/Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
SPK_NAME = homeassistant
SPK_VERS = 0.118.5
SPK_REV = 10
SPK_REV = 11
SPK_ICON = src/${SPK_NAME}.png

SPK_DEPENDS = "python3>=3.7.7"
Expand Down Expand Up @@ -29,7 +29,7 @@ WHEELS = src/requirements.txt
MAINTAINER = ymartin59
DESCRIPTION = Home Assistant is an open-source home automation platform running on Python 3. Track and control all devices at home and automate control.
DISPLAY_NAME = Home Assistant Core
CHANGELOG = "1. Update Home Assistant to v0.118.5<br/>2. Update dependencies"
CHANGELOG = "Fix xiaomi device integrations"
RELOAD_UI = yes
STARTABLE = yes

Expand Down
12 changes: 8 additions & 4 deletions spk/homeassistant/src/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ curve25519-donna==1.3 # https://github.com/ikalchev/HAP-python/blob/dev/requirem
ecdsa==0.16.1
ed25519==1.5
pycryptodome==3.9.9
tlslite-ng==0.7.5
tlslite-ng==0.7.6


# homeassistant.components.mastodon
Expand Down Expand Up @@ -159,7 +159,7 @@ PyTurboJPEG==1.4.0
#PyViCare==0.2.0

# homeassistant.components.xiaomi_aqara
#PyXiaomiGateway==0.13.4
PyXiaomiGateway==0.13.4

# homeassistant.components.bmp280
# homeassistant.components.mcp23017
Expand Down Expand Up @@ -542,7 +542,7 @@ connect-box==0.2.8
# homeassistant.components.eddystone_temperature
# homeassistant.components.eq3btsmart
# homeassistant.components.xiaomi_miio
#construct==2.9.45
construct==2.9.45

# homeassistant.components.coronavirus
#coronavirus==1.1.1
Expand Down Expand Up @@ -1794,6 +1794,8 @@ pysabnzbd==1.1.0

# homeassistant.components.snmp
pysnmp==4.4.12
pysmi==0.3.4
pycryptodomex==3.9.9

# homeassistant.components.soma
#pysoma==0.0.10
Expand Down Expand Up @@ -1878,7 +1880,9 @@ demjson==2.2.4
# python-lirc==1.2.3

# homeassistant.components.xiaomi_miio
#python-miio==0.5.3
python-miio==0.5.3
croniter==0.3.36
natsort==7.1.0

# homeassistant.components.mpd
#python-mpd2==1.0.0
Expand Down
22 changes: 16 additions & 6 deletions spk/homeassistant/src/service-setup.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# no shebang, this file is included by following scripts
# - installer
# - start-stop-status

PYTHON_DIR="/usr/local/python3"
VIRTUALENV="${PYTHON_DIR}/bin/virtualenv"
PATH="${SYNOPKG_PKGDEST}/env/bin:${SYNOPKG_PKGDEST}/bin:${PYTHON_DIR}/bin:${PATH}"
Expand All @@ -10,18 +14,24 @@ HOME="${SYNOPKG_PKGDEST}/var/"

service_postinst ()
{
# use alternate TMPDIR (as /tmp might have <400MB free space for 'pip install')
# TMPDIR is supported by pip https://github.com/pypa/pip/issues/4462 ('--build dir' is not supported anymore)
TMPDIR=${SYNOPKG_PKGDEST}/tmp
mkdir -p "${TMPDIR}"

# Create a Python virtualenv
${VIRTUALENV} --system-site-packages ${SYNOPKG_PKGDEST}/env >> ${INST_LOG}

# Install the wheels
TMPDIR=${SYNOPKG_PKGDEST}/tmp ${SYNOPKG_PKGDEST}/env/bin/pip install --no-deps --no-input --upgrade --no-index --find-links ${SYNOPKG_PKGDEST}/share/wheelhouse ${SYNOPKG_PKGDEST}/share/wheelhouse/*.whl >> ${INST_LOG} 2>&1
${SYNOPKG_PKGDEST}/env/bin/pip install --no-deps --no-input --upgrade --no-index --find-links ${SYNOPKG_PKGDEST}/share/wheelhouse ${SYNOPKG_PKGDEST}/share/wheelhouse/*.whl >> ${INST_LOG} 2>&1

mkdir -p "${CONFIG_DIR}"
# For pip to install pure python module (others have to be provided as wheels in requirement.txt)
chown -R ${EFF_USER} ${SYNOPKG_PKGDEST}/env
}


# use alternate TMPDIR for service_postinst and start_daemon (start-stop-status)
# /tmp might have <400MB free space
# TMPDIR is supported by pip https://github.com/pypa/pip/issues/4462 ('--build dir' is not supported anymore)
TMPDIR=${SYNOPKG_PKGDEST}/tmp
if [[ ! -e "${TMPDIR}" ]]; then
mkdir -p "${TMPDIR}"
chown ${EFF_USER} "${TMPDIR}"
fi
export TMPDIR=${SYNOPKG_PKGDEST}/tmp

0 comments on commit 4d89923

Please sign in to comment.