Skip to content

Commit

Permalink
homeassistant: update to v2022.10.5 (#5478)
Browse files Browse the repository at this point in the history
* homeassistant: update to v2022.10.5
- initial commit, wheel for orjson deactivated, as it does not build yet
- requirements of official requirement files updated
- additional requirements not validated yet

* fix build of orjson wheel
- include native/python310 bin folder in PATH to find maturin (and avoid use of python3, pip, wheel.. of dev environment)
- declare ARMv5 and OLD_PPC_ARCHS as unsupported (C++11 required for numpy)

* fix botocore version

* homeassistant update
- update dependencies
- adjust service-setup for command line parameters that are not supported anymore (--pid-file, --daemon)
- avoid use of install_python_wheels function, as we want to install whl files from wheelhouse
- abort installation when default_config installation failed (fail fast)
- increase expected installation time up to 60 minutes (it took 55 min. on a DS115j)

* initial requirements update
- update requirements (crossenv and pure, remove abi3)
- move requirements of default_configuration to requirements-pure.txt
- homeassistant core, web and default_config are working without errors
- some integrations work already (synology dsm/srm, hue, brother, ipp)
- update package icon with higher resolution

* fix psutil wheel for qoriq

* adjust requirements
- add hacs integration (from archive file)
- add pycryptodomex (requirements-abi3.txt)
- save/restore pip-cache on package update
- fix dependencies
- fix psutil for qoriq (again)
- remove duplicate requirements

* adjust multidict dependency
- multidict<6.0.0,>=5.1.0 required

* fix python virtualenv creation for DSM<7
- package user needs access to created virtual environment
* fix python wheels installation for DSM<7
- package user needs access to installed site-packages
* fix permissions to site-packages for DSM<7

* Add requirements-custom.txt
- Add requirements-custom.txt for custom requirements that will be reinstalled on package update
- add websockets to crossenv reqirements
- add pycryptodome

* fix custom requirements installation
  • Loading branch information
hgy59 authored Jan 22, 2023
1 parent 8b13da2 commit 661ac47
Show file tree
Hide file tree
Showing 15 changed files with 405 additions and 336 deletions.
8 changes: 8 additions & 0 deletions mk/spksrc.service.installer.functions
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,10 @@ install_python_virtualenv ()

# Update to latest pip package installer
python3 -m pip install --upgrade pip

if [ ${SYNOPKG_DSM_VERSION_MAJOR} -lt 7 ]; then
set_unix_permissions ${SYNOPKG_PKGDEST}/env
fi
}


Expand All @@ -85,6 +89,10 @@ install_python_wheels ()
--requirement ${requirements}
fi

if [ ${SYNOPKG_DSM_VERSION_MAJOR} -lt 7 ]; then
set_unix_permissions ${SYNOPKG_PKGDEST}/env
fi

echo "Installed modules:"
pip freeze
}
Expand Down
60 changes: 50 additions & 10 deletions spk/homeassistant/Makefile
Original file line number Diff line number Diff line change
@@ -1,16 +1,19 @@
SPK_NAME = homeassistant
SPK_VERS = 2022.7.7
SPK_REV = 18
SPK_ICON = src/${SPK_NAME}.png
SPK_VERS = 2022.10.5
SPK_REV = 19
SPK_ICON = src/homeassistant.png

SPK_DEPENDS = "python310"

BUILD_DEPENDS = cross/python310

# [numpy] > 1.22.4
UNSUPPORTED_ARCHS = $(ARMv5_ARCHS) $(OLD_PPC_ARCHS) $(ARMv7L_ARCHS)

MAINTAINER = hgy59
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 = "Update homeassistant to 2022.7.7.<br/>Only arch specific python modules are included in the package. Other modules are downloaded at installation time."
CHANGELOG = "1. Update homeassistant to 2022.10.5.<br/>2. Update Python to 3.10.<br/>3. Add requirements-custom.txt where a user can add manually installed python modules, that will be reinstalled on package updates.<br/><br/>REMARKS: Only arch specific python modules are included in the package. Other modules are downloaded at installation time."
STARTABLE = yes

HOMEPAGE = https://www.home-assistant.io/
Expand All @@ -29,7 +32,19 @@ USE_ALTERNATE_TMPDIR = 1
POST_STRIP_TARGET = homeassistant_extra_install

# Include cross compiled wheels only, the package installer downloads pure python wheels at installation time.
WHEELS = src/requirements-crossenv.txt src/requirements-pure.txt src/requirements-abi3.txt
WHEELS = src/requirements-abi3.txt src/requirements-crossenv.txt src/requirements-pure.txt

# cross wheels from source
# ------------------------
# those that do not build in crossenv (yet)

# [DTLSSocket] Required for postinst [tradfri]
DEPENDS += cross/dtlssocket


# definitions and libraries
# to build wheels of src/requirements-crossenv.txt
# ------------------------

# [gevent]
DEPENDS += cross/libev cross/c-ares
Expand All @@ -39,9 +54,6 @@ ENV += GEVENTSETUP_EMBED_LIBEV=FALSE
# [python-libnmap]
DEPENDS += cross/nmap

# [DTLSSocket] Required for postinst [tradfri]
DEPENDS += cross/dtlssocket

# [PyYAML]
DEPENDS += cross/libyaml

Expand All @@ -62,8 +74,25 @@ WHEELS_BUILD_ARGS += --enable-freetype
WHEELS_BUILD_ARGS += --enable-jpeg
WHEELS_BUILD_ARGS += --enable-zlib

# [cryptography]
ENV += PYO3_CROSS_LIB_DIR=$(STAGING_INSTALL_PREFIX)/lib/
ENV += PYO3_CROSS_INCLUDE_DIR=$(STAGING_INSTALL_PREFIX)/include/

# [gevent]
DEPENDS += cross/libev cross/c-ares
ENV += GEVENTSETUP_EMBED_CARES=FALSE
ENV += GEVENTSETUP_EMBED_LIBEV=FALSE

# [lxml]
DEPENDS += cross/libxml2
DEPENDS += cross/libxslt


include ../../mk/spksrc.spk.mk

# prefere native python tools (pip, maturin, ...)
ENV += PATH=$(realpath $(WORK_DIR)/../../../native/python310/work-native/install/usr/local/bin):$(PATH)

# [numpy]
# Fix wheel building with older compilers
ifeq ($(call version_lt, $(TC_GCC), 5.0),1)
Expand All @@ -75,8 +104,19 @@ WHEELS_CFLAGS = [numpy] -O0
endif
endif

# [pycryptodomex]
ifeq ($(call version_ge, ${TC_GCC}, 4.9),1)
WHEELS_CFLAGS += [pycryptodome] -std=c11
WHEELS_CFLAGS += [pycryptodomex] -std=c11
else
WHEELS_CFLAGS += [pycryptodome] -std=c99
WHEELS_CFLAGS += [pycryptodomex] -std=c99
endif


.PHONY: homeassistant_extra_install
homeassistant_extra_install:
@install -m 755 -d $(STAGING_DIR)/share
@install -m 644 src/postinst_default_config_requirements.txt $(STAGING_DIR)/share/
@install -m 755 -d $(STAGING_DIR)/share $(STAGING_DIR)/var
@install -m 644 src/postinst_components_requirements.txt $(STAGING_DIR)/share/
@install -m 644 src/hacs.tar.gz $(STAGING_DIR)/share/
@install -m 644 src/requirements-custom.txt $(STAGING_DIR)/var/requirements-custom.txt.new
Binary file added spk/homeassistant/src/hacs.tar.gz
Binary file not shown.
Binary file modified spk/homeassistant/src/homeassistant.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
140 changes: 77 additions & 63 deletions spk/homeassistant/src/postinst_components_requirements.txt
Original file line number Diff line number Diff line change
@@ -1,72 +1,75 @@
# requirements by dedicated integrations

### for components:
### pure python packages for components:

# for HACS
aiogithubapi==22.10.1

abodepy==1.2.0
accuweather==0.2.0
adax==0.1.1
accuweather==0.4.0
adax==0.2.0
adext==0.4.2
adguardhome==0.5.0
advantage-air==0.2.5
adguardhome==0.5.1
advantage-air==0.4.1
AEMET-OpenData==0.2.1
aenum==3.1.0
agent-py==0.0.23
aio-geojson-client==0.15
aio-georss-client==0.8
aioambient==1.3.0
aioasuswrt==1.3.4
aioambient==2021.11.0
aioasuswrt==1.4.0
aioazuredevops==1.3.5
aiocache==0.11.1
aiocoap==0.4.1
aiofiles==0.7.0
aiohue==4.5.0
aiohwenergy==0.4.0
aiosqlite==0.17.0
airly==1.1.0
alarmdecoder==1.13.11
ambee==0.3.0
ambiclimate==0.2.1
arcam-fmj==0.7.0
arcam-fmj==0.12.0
arrow==1.1.1
asyncio-dgram==2.1.0
asyncio-mqtt==0.10.0
asyncio-throttle==1.0.2
asyncssh==2.7.0
authcaptureproxy==1.0.2
authlib==0.15.4
Authlib==0.15.4
axis==44
backoff==1.11.1
beautifulsoup4==4.9.3
bellows==0.27.0
beautifulsoup4==4.11.1
bellows==0.34.2
bidict==0.21.2
bimmer-connected==0.7.20
bimmer-connected==0.10.4
bitstring==3.1.9
bleak==0.12.1
blebox-uniapi==1.3.3
blinkpy==0.17.0
blebox-uniapi==2.0.2
blinkpy==0.19.2
bond-api==0.1.12
boschshcpy==0.2.19
broadlink==0.17.0
brother==1.0.2
bsblan==0.4.0
buienradar==1.0.4
boschshcpy==0.2.35
broadlink==0.18.2
brother==2.0.0
bsblan==0.5.0
buienradar==1.0.5
cached-property==1.5.2
charset-normalizer==2.0.7
casttube==0.2.1
cbor2==5.4.1
co2signal==0.4.2
# cbor2==5.4.1 => cross-env
CO2Signal==0.4.2
commentjson==0.9.0
convertdate==2.3.2
crccheck==1.0
crcmod==1.7
croniter==1.0.15
croniter==1.0.6
cssselect==1.1.0
dacite==1.6.0
dataclasses-json==0.5.4
dataclasses-json==0.5.3
dateparser==1.0.0
#demjson==2.2.4 ==> build error
denonavr==0.10.8
deepmerge==1.1.0
denonavr==0.10.11
dicttoxml==1.7.4
fjaraskupan==1.0.0
fritzconnection==1.6.0
fjaraskupan==2.0.0
fritzconnection==1.10.3
future==0.18.2
geographiclib==1.52
geojson==2.5.0
Expand All @@ -75,9 +78,9 @@ getmac==0.8.2
google-api-core==1.31.1
google-auth==1.34.0
graphql-subscription-manager==0.4.0
greeclimate==0.11.8
greeclimate==1.3.0
ha-ffmpeg==3.0.2
hangups==0.4.14
hangups==0.4.18
haversine==2.3.1
hijri-converter==2.1.3
httpsig==1.3.0
Expand All @@ -93,69 +96,80 @@ korean-lunar-calendar==0.2.1
lark==0.11.3
loguru==0.5.3
lomond==0.3.3
marshmallow==3.13.0
marshmallow-dataclass==8.5.3
marshmallow-enum==1.5.1
mechanicalsoup==1.1.0
marshmallow==3.13.0
# for hangups==0.4.18:
# ConfigArgParse-1.5.3 MechanicalSoup-0.12.0 ReParser-1.4.3 appdirs-1.4.4 hangups-0.4.18 readlike-0.1.3 urwid-2.1.2
MechanicalSoup==0.12.0
metar==1.8.0
ms-cv==0.1.1
mypy-extensions==0.4.3
oauthlib==3.1.1
packaging==20.9
paho-mqtt==1.5.1
paho-mqtt==1.6.1
pi1wire==0.1.0
pkce==1.0.3
platformdirs==2.4.0
plumbum==1.7.0
protobuf==3.17.3
# protobuf==3.17.3 => cross-env
# psutil-home-assistant==0.0.1 => pure
ptyprocess==0.7.0
pubnub==5.1.4
py-canary==0.5.1
pyairvisual==5.0.9
pubnub==7.0.2
py-canary==0.5.3
py-synologydsm-api==1.0.8
pyairvisual==2022.7.0
pyalmond==0.0.2
pyatag==0.3.5.3
pyatv==0.10.3
pyclimacell==0.18.2
pydantic==1.8.2
pydaikin==2.4.4
pyfritzhome==0.6.2
pyialarm==1.9.0
pyicloud==0.10.2
pymeeus==0.5.11
pydaikin==2.7.2
pydantic==1.10.2
pyfritzhome==0.6.7
pyialarm==2.2.0
pyicloud==1.0.0
pyipp==0.11.0
PyMeeus==0.5.11
pyMetno==0.9.0
pyoctoprintapi==0.1.8
pyownet==0.10.0.post1
pyquery==1.4.3
pyserial-asyncio==0.5
pyserial==3.5
pysiaalarm==3.0.0
pyserial-asyncio==0.6
pysiaalarm==3.0.2
pysmb==1.2.7
pysocketio==0.9.6a4
python-awair==0.2.1
pysnmplib==5.0.15
# pysocketio==0.9.6a4 => requires gevent==0.13.7 (this is python2 only)
# python-awair==0.2.1 => python-awair 0.2.1 requires voluptuous<0.13.0,>=0.11.7, but homeassistant==2022.10.5 requires voluptuous==0.13.1
python-engineio==4.2.1
python-izone==1.1.6
python-izone==1.2.9
python-socketio==5.4.0
python-songpal==0.12
pytradfri==7.0.6
python-songpal==0.15.1
pytradfri==9.0.0
pyusb==1.2.1
pywemo==0.6.7
pywemo==0.9.1
radios==0.1.1
ratelimit==2.2.1
reparser==1.4.3
ReParser==1.4.3
requests-file==1.5.1
requests-oauthlib==1.3.0
semver==2.13.0
srptools==1.0.1
ssdp==1.1.0
stringcase==1.2.0
synology-srm==0.2.0
tenacity==8.0.1
teslajsonpy==0.18.3
typing-inspect==0.7.1
tzlocal==3.0
tzlocal==4.2
WSDiscovery==2.0.0
xmltodict==0.12.0
yalexs==1.1.13
xmltodict==0.13.0
yalexs==1.2.6
zeep==4.1.0
zha-quirks==0.0.60
zha-quirks==0.0.83
zigpy-cc==0.5.2
zigpy-deconz==0.13.0
zigpy-xbee==0.14.0
zigpy-zigate==0.7.3
zigpy-znp==0.5.4
zigpy==0.37.1
zigpy-deconz==0.19.0
zigpy-xbee==0.16.2
zigpy-zigate==0.10.2
zigpy-znp==0.9.1
zigpy==0.51.3
zope.event==4.5.0
Loading

0 comments on commit 661ac47

Please sign in to comment.