|
@@ -79,10 +79,10 @@ grade: stable
|
|
confinement: strict
|
|
confinement: strict
|
|
|
|
|
|
architectures:
|
|
architectures:
|
|
- # - build-on: amd64
|
|
|
|
|
|
+ - build-on: amd64
|
|
# - build-on: arm64
|
|
# - build-on: arm64
|
|
- - build-on: armhf
|
|
|
|
- - build-on: ppc64el
|
|
|
|
|
|
+ # - build-on: armhf
|
|
|
|
+ # - build-on: ppc64el
|
|
|
|
|
|
layout:
|
|
layout:
|
|
/usr/local/lib:
|
|
/usr/local/lib:
|
|
@@ -127,6 +127,7 @@ apps:
|
|
daemon: simple
|
|
daemon: simple
|
|
environment:
|
|
environment:
|
|
PIP_USER: 1
|
|
PIP_USER: 1
|
|
|
|
+ #PYTHONPATH: "$PYTHONPATH:$SNAP/lib/python3.9/site-packages"
|
|
restart-condition: always
|
|
restart-condition: always
|
|
plugs:
|
|
plugs:
|
|
- bluez
|
|
- bluez
|
|
@@ -150,11 +151,31 @@ apps:
|
|
PIP_USER: 1
|
|
PIP_USER: 1
|
|
command: bin/hass --script check_config --config $SNAP_DATA -i
|
|
command: bin/hass --script check_config --config $SNAP_DATA -i
|
|
|
|
|
|
|
|
+package-repositories:
|
|
|
|
+ - type: apt
|
|
|
|
+ ppa: deadsnakes/ppa
|
|
|
|
+
|
|
parts:
|
|
parts:
|
|
|
|
+ # python:
|
|
|
|
+ # plugin: dump
|
|
|
|
+ # source: ./src/nil
|
|
|
|
+ # build-packages:
|
|
|
|
+ # - python3.9-dev
|
|
|
|
+ # stage-packages:
|
|
|
|
+ # - python3.9-venv
|
|
|
|
+ # - python3.9-distutils
|
|
|
|
+ # override-build: |
|
|
|
|
+ # snapcraftctl build
|
|
|
|
+ # cp -rf $(find /snap -path *python3.9/distutils -print0 -quit) ${SNAPCRAFT_PART_INSTALL}/usr/lib/python3.9
|
|
|
|
+
|
|
homeassistant:
|
|
homeassistant:
|
|
|
|
+ # after: [python]
|
|
plugin: python #-wot-plugin
|
|
plugin: python #-wot-plugin
|
|
source: https://github.com/home-assistant/core.git
|
|
source: https://github.com/home-assistant/core.git
|
|
source-tag: ${SNAPCRAFT_PROJECT_VERSION}
|
|
source-tag: ${SNAPCRAFT_PROJECT_VERSION}
|
|
|
|
+ # build-environment:
|
|
|
|
+ # - SNAPCRAFT_PYTHON_INTERPRETER: python3.9
|
|
|
|
+ # - SNAPCRAFT_PYTHON_VENV_ARGS: --system-site-packages
|
|
python-packages:
|
|
python-packages:
|
|
- setuptools<58
|
|
- setuptools<58
|
|
- wheel
|
|
- wheel
|
|
@@ -171,6 +192,7 @@ parts:
|
|
- libavformat-dev
|
|
- libavformat-dev
|
|
- libavresample-dev
|
|
- libavresample-dev
|
|
- libavutil-dev
|
|
- libavutil-dev
|
|
|
|
+ - libcrypt-dev
|
|
- libffi-dev
|
|
- libffi-dev
|
|
- libglib2.0-dev
|
|
- libglib2.0-dev
|
|
- libglu1-mesa-dev
|
|
- libglu1-mesa-dev
|
|
@@ -185,7 +207,6 @@ parts:
|
|
- libxml2-dev
|
|
- libxml2-dev
|
|
- libxslt1-dev
|
|
- libxslt1-dev
|
|
- pkg-config
|
|
- pkg-config
|
|
- - python3
|
|
|
|
- python3-dev
|
|
- python3-dev
|
|
- zlib1g-dev
|
|
- zlib1g-dev
|
|
- on armhf:
|
|
- on armhf:
|
|
@@ -216,6 +237,20 @@ parts:
|
|
constraints:
|
|
constraints:
|
|
- homeassistant/package_constraints.txt
|
|
- homeassistant/package_constraints.txt
|
|
override-build: |
|
|
override-build: |
|
|
|
|
+ # export PYTHONPATH="/root/parts/python/install/usr/lib/python3.9"
|
|
|
|
+ # python3.9 -c 'help("modules")'
|
|
|
|
+ # /root/parts/python/install/usr/bin/python3.9 -c 'help("modules")'
|
|
|
|
+ # mkdir -p "${SNAPCRAFT_PART_INSTALL}/bin"
|
|
|
|
+ # ln -sf /root/parts/python/install/usr/bin/python3.9 /root/parts/homeassistant/install/bin/python3.9
|
|
|
|
+ # /root/parts/homeassistant/install/bin/python3.9 -c 'help("modules")'
|
|
|
|
+ # rm -rf /var/tmp/*
|
|
|
|
+ # /root/parts/homeassistant/install/bin/python3.9 -Im ensurepip
|
|
|
|
+ # IDISTUTILS="$(find ${SNAPCRAFT_PART_INSTALL} -path *python3.9/distutils -print0 -quit)"
|
|
|
|
+ # UDISTUTILS="$(find /usr -path *python3.9/distutils -print0 -quit)"
|
|
|
|
+ # rm -rf "${IDISTUTILS}"
|
|
|
|
+ # cp -r "${UDISTUTILS}" "${IDISTUTILS}"
|
|
|
|
+ # mkdir -p "${SNAPCRAFT_PART_INSTALL}/usr/include"
|
|
|
|
+ # cp -r "$(find /usr -path *include/python3.9 -print0 -quit)" "${SNAPCRAFT_PART_INSTALL}/usr/include"
|
|
snapcraftctl build
|
|
snapcraftctl build
|
|
sed -i 's/include-system-site-packages = false/include-system-site-packages = true/g' $SNAPCRAFT_PART_INSTALL/pyvenv.cfg
|
|
sed -i 's/include-system-site-packages = false/include-system-site-packages = true/g' $SNAPCRAFT_PART_INSTALL/pyvenv.cfg
|
|
updater:
|
|
updater:
|
|
@@ -224,7 +259,7 @@ parts:
|
|
source: ./src/components
|
|
source: ./src/components
|
|
source-type: local
|
|
source-type: local
|
|
organize:
|
|
organize:
|
|
- '*': lib/python3.8/site-packages/homeassistant/components/
|
|
|
|
|
|
+ '*': lib/python3.9/site-packages/homeassistant/components/
|
|
bins:
|
|
bins:
|
|
plugin: dump
|
|
plugin: dump
|
|
source: ./src/bin
|
|
source: ./src/bin
|