Skip to content

Commit

Permalink
Add requirements-custom.txt
Browse files Browse the repository at this point in the history
- Add requirements-custom.txt for custom requirements that will be reinstalled on package update
- add websockets to crossenv reqirements
- add pycryptodome
  • Loading branch information
hgy59 committed Jan 15, 2023
1 parent 706a079 commit 96b5dfd
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 2 deletions.
7 changes: 5 additions & 2 deletions spk/homeassistant/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ 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 = "1. Update homeassistant to 2022.10.5.<br/>2. Update Python to 3.10.<br/><br/>REMARKS: 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 Down Expand Up @@ -106,14 +106,17 @@ 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 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/
1 change: 1 addition & 0 deletions spk/homeassistant/src/requirements-abi3.txt
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
pycryptodome==3.15.0
pycryptodomex==3.15.0
1 change: 1 addition & 0 deletions spk/homeassistant/src/requirements-crossenv.txt
Original file line number Diff line number Diff line change
Expand Up @@ -122,5 +122,6 @@ guppy3==3.1.2
psutil==5.9.4
Pillow==9.2.0
pyitachip2ir==0.0.7
websockets==10.4

# DTLSSocket==0.1.12 ==> cross/dtlssocket
14 changes: 14 additions & 0 deletions spk/homeassistant/src/requirements-custom.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Home Assistant core
# requirements-custom.txt
#
# This file is for additional python modules that will be installed on a package update.
#
# For example:
# When you manually installed a python module with pip, you can add here a line for each module
# like "module==version" (or "module>=version", or ...)
# and it will be installed by the installer on the next package update.
#
# This is experimental and has limitations:
# - probably your custom modules will need updated versions, so you can try to omit the version
# - you can get unresolvable conflicts with other python modules
#
5 changes: 5 additions & 0 deletions spk/homeassistant/src/service-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,11 @@ service_postinst ()
echo "Install packages for homeassistant.components from index"
pip install --disable-pip-version-check --no-input --cache-dir ${PIP_CACHE_DIR} --requirement ${SYNOPKG_PKGDEST}/share/postinst_components_requirements.txt

if [ -e ${SYNOPKG_PKGVAR}/requirements-custom.txt ]; then
echo ${separator}
echo "Install custom packages from index"
pip install --disable-pip-version-check --no-input --cache-dir ${PIP_CACHE_DIR} --requirement ${SYNOPKG_PKGVAR}/requirements-custom.txt
fi

if [ ${SYNOPKG_DSM_VERSION_MAJOR} -lt 7 ]; then
# ensure package user has access to the virtual env packages, installed as root
Expand Down

0 comments on commit 96b5dfd

Please sign in to comment.