Python 3.10 / Base image 2022.06.01 (#73830)

* Python 3.10 / Base image 2022.06.01

* Update requirements

* push opencv

* we don't need numpy on core for now

* Remove unused ignore

Co-authored-by: Franck Nijhof <git@frenck.dev>
This commit is contained in:
Pascal Vizeli 2022-06-22 19:04:39 +02:00 committed by GitHub
parent 6b6e5fad3c
commit 6cf9b22b5a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
19 changed files with 43 additions and 162 deletions

View file

@ -65,47 +65,6 @@ jobs:
path: ./requirements_diff.txt
core:
name: Build wheels with ${{ matrix.tag }} (${{ matrix.arch }}) for core
if: github.repository_owner == 'home-assistant'
needs: init
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
arch: ${{ fromJson(needs.init.outputs.architectures) }}
tag:
- "3.9-alpine3.14"
steps:
- name: Checkout the repository
uses: actions/checkout@v3.0.2
- name: Download env_file
uses: actions/download-artifact@v3
with:
name: env_file
- name: Download requirements_diff
uses: actions/download-artifact@v3
with:
name: requirements_diff
- name: Build wheels
uses: home-assistant/wheels@2022.01.2
with:
tag: ${{ matrix.tag }}
arch: ${{ matrix.arch }}
wheels-host: wheels.hass.io
wheels-key: ${{ secrets.WHEELS_KEY }}
wheels-user: wheels
env-file: true
apk: "build-base;cmake;git;linux-headers;bluez-dev;libffi-dev;openssl-dev;glib-dev;eudev-dev;libxml2-dev;libxslt-dev;cargo"
pip: "Cython;numpy==1.21.6"
skip-binary: aiohttp
constraints: "homeassistant/package_constraints.txt"
requirements-diff: "requirements_diff.txt"
requirements: "requirements.txt"
core_musllinux:
name: Build musllinux wheels with musllinux_1_2 / cp310 at ${{ matrix.arch }} for core
if: github.repository_owner == 'home-assistant'
needs: init
@ -128,18 +87,6 @@ jobs:
with:
name: requirements_diff
- name: Adjust ENV / CP310
run: |
if [ "${{ matrix.arch }}" = "i386" ]; then
echo "NPY_DISABLE_SVML=1" >> .env_file
fi
requirement_files="requirements_all.txt requirements_diff.txt"
for requirement_file in ${requirement_files}; do
sed -i "s|numpy==1.21.6|numpy==1.22.4|g" ${requirement_file}
done
echo "numpy==1.22.4" >> homeassistant/package_constraints.txt
- name: Build wheels
uses: home-assistant/wheels@2022.06.6
with:
@ -148,76 +95,13 @@ jobs:
arch: ${{ matrix.arch }}
wheels-key: ${{ secrets.WHEELS_KEY }}
env-file: true
apk: "bluez-dev;libffi-dev;openssl-dev;glib-dev;eudev-dev;libxml2-dev;libxslt-dev;yaml-dev"
apk: "libffi-dev;openssl-dev;yaml-dev"
skip-binary: aiohttp
constraints: "homeassistant/package_constraints.txt"
requirements-diff: "requirements_diff.txt"
requirements: "requirements.txt"
integrations:
name: Build wheels with ${{ matrix.tag }} (${{ matrix.arch }}) for integrations
if: github.repository_owner == 'home-assistant'
needs: init
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
arch: ${{ fromJson(needs.init.outputs.architectures) }}
tag:
- "3.9-alpine3.14"
steps:
- name: Checkout the repository
uses: actions/checkout@v3.0.2
- name: Download env_file
uses: actions/download-artifact@v3
with:
name: env_file
- name: Download requirements_diff
uses: actions/download-artifact@v3
with:
name: requirements_diff
- name: Uncomment packages
run: |
requirement_files="requirements_all.txt requirements_diff.txt"
for requirement_file in ${requirement_files}; do
sed -i "s|# pybluez|pybluez|g" ${requirement_file}
sed -i "s|# bluepy|bluepy|g" ${requirement_file}
sed -i "s|# beacontools|beacontools|g" ${requirement_file}
sed -i "s|# fritzconnection|fritzconnection|g" ${requirement_file}
sed -i "s|# pyuserinput|pyuserinput|g" ${requirement_file}
sed -i "s|# evdev|evdev|g" ${requirement_file}
sed -i "s|# python-eq3bt|python-eq3bt|g" ${requirement_file}
sed -i "s|# pycups|pycups|g" ${requirement_file}
sed -i "s|# homekit|homekit|g" ${requirement_file}
sed -i "s|# decora_wifi|decora_wifi|g" ${requirement_file}
sed -i "s|# decora|decora|g" ${requirement_file}
sed -i "s|# avion|avion|g" ${requirement_file}
sed -i "s|# PySwitchbot|PySwitchbot|g" ${requirement_file}
sed -i "s|# pySwitchmate|pySwitchmate|g" ${requirement_file}
sed -i "s|# face_recognition|face_recognition|g" ${requirement_file}
sed -i "s|# python-gammu|python-gammu|g" ${requirement_file}
done
- name: Build wheels
uses: home-assistant/wheels@2022.01.2
with:
tag: ${{ matrix.tag }}
arch: ${{ matrix.arch }}
wheels-host: wheels.hass.io
wheels-key: ${{ secrets.WHEELS_KEY }}
wheels-user: wheels
env-file: true
apk: "build-base;cmake;git;linux-headers;libexecinfo-dev;bluez-dev;libffi-dev;openssl-dev;glib-dev;eudev-dev;libxml2-dev;libxslt-dev;libpng-dev;libjpeg-turbo-dev;tiff-dev;autoconf;automake;cups-dev;gmp-dev;mpfr-dev;mpc1-dev;ffmpeg-dev;gammu-dev;yaml-dev;cargo"
pip: "Cython;numpy;scikit-build"
skip-binary: aiohttp,grpcio
constraints: "homeassistant/package_constraints.txt"
requirements-diff: "requirements_diff.txt"
requirements: "requirements_all.txt"
integrations_musllinux:
name: Build musllinux wheels with musllinux_1_2 / cp310 at ${{ matrix.arch }} for integrations
if: github.repository_owner == 'home-assistant'
needs: init
@ -256,18 +140,12 @@ jobs:
sed -i "s|# python-gammu|python-gammu|g" ${requirement_file}
done
- name: Adjust ENV / CP310
- name: Adjust ENV
run: |
if [ "${{ matrix.arch }}" = "i386" ]; then
echo "NPY_DISABLE_SVML=1" >> .env_file
fi
requirement_files="requirements_all.txt requirements_diff.txt"
for requirement_file in ${requirement_files}; do
sed -i "s|numpy==1.21.6|numpy==1.22.4|g" ${requirement_file}
done
echo "numpy==1.22.4" >> homeassistant/package_constraints.txt
- name: Build wheels
uses: home-assistant/wheels@2022.06.6
with:

View file

@ -25,21 +25,6 @@ RUN \
-e ./homeassistant --use-deprecated=legacy-resolver \
&& python3 -m compileall homeassistant/homeassistant
# Fix Bug with Alpine 3.14 and sqlite 3.35
# https://gitlab.alpinelinux.org/alpine/aports/-/issues/12524
ARG BUILD_ARCH
RUN \
if [ "${BUILD_ARCH}" = "amd64" ]; then \
export APK_ARCH=x86_64; \
elif [ "${BUILD_ARCH}" = "i386" ]; then \
export APK_ARCH=x86; \
else \
export APK_ARCH=${BUILD_ARCH}; \
fi \
&& curl -O http://dl-cdn.alpinelinux.org/alpine/v3.13/main/${APK_ARCH}/sqlite-libs-3.34.1-r0.apk \
&& apk add --no-cache sqlite-libs-3.34.1-r0.apk \
&& rm -f sqlite-libs-3.34.1-r0.apk
# Home Assistant S6-Overlay
COPY rootfs /

View file

@ -1,11 +1,11 @@
image: homeassistant/{arch}-homeassistant
shadow_repository: ghcr.io/home-assistant
build_from:
aarch64: ghcr.io/home-assistant/aarch64-homeassistant-base:2022.05.0
armhf: ghcr.io/home-assistant/armhf-homeassistant-base:2022.05.0
armv7: ghcr.io/home-assistant/armv7-homeassistant-base:2022.05.0
amd64: ghcr.io/home-assistant/amd64-homeassistant-base:2022.05.0
i386: ghcr.io/home-assistant/i386-homeassistant-base:2022.05.0
aarch64: ghcr.io/home-assistant/aarch64-homeassistant-base:2022.06.1
armhf: ghcr.io/home-assistant/armhf-homeassistant-base:2022.06.1
armv7: ghcr.io/home-assistant/armv7-homeassistant-base:2022.06.1
amd64: ghcr.io/home-assistant/amd64-homeassistant-base:2022.06.1
i386: ghcr.io/home-assistant/i386-homeassistant-base:2022.06.1
codenotary:
signer: notary@home-assistant.io
base_image: notary@home-assistant.io

View file

@ -2,7 +2,7 @@
"domain": "compensation",
"name": "Compensation",
"documentation": "https://www.home-assistant.io/integrations/compensation",
"requirements": ["numpy==1.21.6"],
"requirements": ["numpy==1.22.4"],
"codeowners": ["@Petro31"],
"iot_class": "calculated"
}

View file

@ -3,7 +3,7 @@
"name": "IQVIA",
"config_flow": true,
"documentation": "https://www.home-assistant.io/integrations/iqvia",
"requirements": ["numpy==1.21.6", "pyiqvia==2022.04.0"],
"requirements": ["numpy==1.22.4", "pyiqvia==2022.04.0"],
"codeowners": ["@bachya"],
"iot_class": "cloud_polling",
"loggers": ["pyiqvia"]

View file

@ -161,7 +161,7 @@ def calculate_trend(indices: list[float]) -> str:
"""Calculate the "moving average" of a set of indices."""
index_range = np.arange(0, len(indices))
index_array = np.array(indices)
linear_fit = np.polyfit(index_range, index_array, 1) # type: ignore[no-untyped-call]
linear_fit = np.polyfit(index_range, index_array, 1)
slope = round(linear_fit[0], 2)
if slope > 0:

View file

@ -2,7 +2,7 @@
"domain": "opencv",
"name": "OpenCV",
"documentation": "https://www.home-assistant.io/integrations/opencv",
"requirements": ["numpy==1.21.6", "opencv-python-headless==4.5.2.54"],
"requirements": ["numpy==1.22.4", "opencv-python-headless==4.6.0.66"],
"codeowners": [],
"iot_class": "local_push"
}

View file

@ -6,7 +6,7 @@
"tensorflow==2.5.0",
"tf-models-official==2.5.0",
"pycocotools==2.0.1",
"numpy==1.21.6",
"numpy==1.22.4",
"pillow==9.1.1"
],
"codeowners": [],

View file

@ -2,7 +2,7 @@
"domain": "trend",
"name": "Trend",
"documentation": "https://www.home-assistant.io/integrations/trend",
"requirements": ["numpy==1.21.6"],
"requirements": ["numpy==1.22.4"],
"codeowners": [],
"quality_scale": "internal",
"iot_class": "local_push"

View file

@ -86,6 +86,9 @@ httpcore==0.15.0
# 5.2.0 fixed a collections abc deprecation
hyperframe>=5.2.0
# Ensure we run compatible with musllinux build env
numpy>=1.22.0
# pytest_asyncio breaks our test suite. We rely on pytest-aiohttp instead
pytest_asyncio==1000000000.0.0

View file

@ -2,4 +2,9 @@ ARG BUILD_VERSION
FROM homeassistant/aarch64-homeassistant:$BUILD_VERSION
RUN apk --no-cache add \
usbutils
usbutils \
&& pip3 install --no-cache-dir --no-index --only-binary=:all: --find-links "${WHEELS_LINKS}" \
pybluez \
pygatt[GATTTOOL] \
-c /usr/src/homeassistant/requirements_all.txt \
--use-deprecated=legacy-resolver

View file

@ -6,7 +6,9 @@ RUN apk --no-cache add \
raspberrypi-libs \
usbutils \
&& pip3 install --no-cache-dir --no-index --only-binary=:all: --find-links "${WHEELS_LINKS}" \
bluepy pybluez -c /usr/src/homeassistant/requirements_all.txt \
pybluez \
pygatt[GATTTOOL] \
-c /usr/src/homeassistant/requirements_all.txt \
--use-deprecated=legacy-resolver
##

View file

@ -6,7 +6,9 @@ RUN apk --no-cache add \
raspberrypi-libs \
usbutils \
&& pip3 install --no-cache-dir --no-index --only-binary=:all: --find-links "${WHEELS_LINKS}" \
bluepy pybluez -c /usr/src/homeassistant/requirements_all.txt \
pybluez \
pygatt[GATTTOOL] \
-c /usr/src/homeassistant/requirements_all.txt \
--use-deprecated=legacy-resolver
##

View file

@ -6,7 +6,9 @@ RUN apk --no-cache add \
raspberrypi-libs \
usbutils \
&& pip3 install --no-cache-dir --no-index --only-binary=:all: --find-links "${WHEELS_LINKS}" \
bluepy pybluez -c /usr/src/homeassistant/requirements_all.txt \
pybluez \
pygatt[GATTTOOL] \
-c /usr/src/homeassistant/requirements_all.txt \
--use-deprecated=legacy-resolver
##

View file

@ -6,7 +6,9 @@ RUN apk --no-cache add \
raspberrypi-libs \
usbutils \
&& pip3 install --no-cache-dir --no-index --only-binary=:all: --find-links "${WHEELS_LINKS}" \
bluepy pybluez -c /usr/src/homeassistant/requirements_all.txt \
pybluez \
pygatt[GATTTOOL] \
-c /usr/src/homeassistant/requirements_all.txt \
--use-deprecated=legacy-resolver
##

View file

@ -3,8 +3,7 @@ FROM homeassistant/armv7-homeassistant:$BUILD_VERSION
RUN apk --no-cache add usbutils \
&& pip3 install --no-cache-dir --no-index --only-binary=:all: --find-links "${WHEELS_LINKS}" \
-c /usr/src/homeassistant/homeassistant/package_constraints.txt \
--use-deprecated=legacy-resolver \
bluepy \
pybluez \
pygatt[GATTTOOL]
pygatt[GATTTOOL] \
-c /usr/src/homeassistant/requirements_all.txt \
--use-deprecated=legacy-resolver

View file

@ -1123,7 +1123,7 @@ numato-gpio==0.10.0
# homeassistant.components.opencv
# homeassistant.components.tensorflow
# homeassistant.components.trend
numpy==1.21.6
numpy==1.22.4
# homeassistant.components.oasa_telematics
oasatelematics==0.3
@ -1156,7 +1156,7 @@ open-garage==0.2.0
open-meteo==0.2.1
# homeassistant.components.opencv
# opencv-python-headless==4.5.2.54
# opencv-python-headless==4.6.0.66
# homeassistant.components.openerz
openerz-api==0.1.0

View file

@ -773,7 +773,7 @@ numato-gpio==0.10.0
# homeassistant.components.opencv
# homeassistant.components.tensorflow
# homeassistant.components.trend
numpy==1.21.6
numpy==1.22.4
# homeassistant.components.google
oauth2client==4.1.3

View file

@ -106,6 +106,9 @@ httpcore==0.15.0
# 5.2.0 fixed a collections abc deprecation
hyperframe>=5.2.0
# Ensure we run compatible with musllinux build env
numpy>=1.22.0
# pytest_asyncio breaks our test suite. We rely on pytest-aiohttp instead
pytest_asyncio==1000000000.0.0