From 0f80d0625afae93228e9e25e686a9d89c52be2e4 Mon Sep 17 00:00:00 2001 From: Franck Nijhof Date: Sat, 22 Apr 2023 19:29:42 +0200 Subject: [PATCH] Wheels: Don't build azure-servicebus on cp311 (#91862) --- .github/workflows/wheels.yml | 11 +++++++++-- homeassistant/components/azure_service_bus/notify.py | 5 +++++ requirements_all.txt | 2 +- script/gen_requirements_all.py | 1 + 4 files changed, 16 insertions(+), 3 deletions(-) diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index a4511c369aa..e5b0bdba09b 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -137,6 +137,7 @@ jobs: run: | requirement_files="requirements_all.txt requirements_diff.txt" for requirement_file in ${requirement_files}; do + sed -i "s|# azure-servicebus|azure-servicebus|g" ${requirement_file} sed -i "s|# pybluez|pybluez|g" ${requirement_file} sed -i "s|# beacontools|beacontools|g" ${requirement_file} sed -i "s|# fritzconnection|fritzconnection|g" ${requirement_file} @@ -258,6 +259,12 @@ jobs: # try to install it. # sed -i "s|# pybluez|pybluez|g" ${requirement_file} + # azure-servicebus requires uamqp, which requires OpenSSL 1.1 to + # compile/build. This is not available on Alpine 3.17. The compat + # layer offered by Alpine conflicts, so we have no way to build + # this package. + # sed -i "s|# azure-servicebus|azure-servicebus|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} @@ -301,7 +308,7 @@ 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;libpng-dev;libjpeg-turbo-dev;tiff-dev;cups-dev;gmp-dev;mpfr-dev;mpc1-dev;ffmpeg-dev;gammu-dev;yaml-dev;openblas-dev;fftw-dev;lapack-dev;gfortran;blas-dev;eigen-dev;freetype-dev;glew-dev;harfbuzz-dev;hdf5-dev;libdc1394-dev;libtbb-dev;mesa-dev;openexr-dev;openjpeg-dev;openssl1.1-compat-dev;uchardet-dev" + apk: "bluez-dev;libffi-dev;openssl-dev;glib-dev;eudev-dev;libxml2-dev;libxslt-dev;libpng-dev;libjpeg-turbo-dev;tiff-dev;cups-dev;gmp-dev;mpfr-dev;mpc1-dev;ffmpeg-dev;gammu-dev;yaml-dev;openblas-dev;fftw-dev;lapack-dev;gfortran;blas-dev;eigen-dev;freetype-dev;glew-dev;harfbuzz-dev;hdf5-dev;libdc1394-dev;libtbb-dev;mesa-dev;openexr-dev;openjpeg-dev;uchardet-dev" skip-binary: aiohttp;grpcio;sqlalchemy;protobuf legacy: true constraints: "homeassistant/package_constraints.txt" @@ -316,7 +323,7 @@ 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;libpng-dev;libjpeg-turbo-dev;tiff-dev;cups-dev;gmp-dev;mpfr-dev;mpc1-dev;ffmpeg-dev;gammu-dev;yaml-dev;openblas-dev;fftw-dev;lapack-dev;gfortran;blas-dev;eigen-dev;freetype-dev;glew-dev;harfbuzz-dev;hdf5-dev;libdc1394-dev;libtbb-dev;mesa-dev;openexr-dev;openjpeg-dev;openssl1.1-compat-dev;uchardet-dev" + apk: "bluez-dev;libffi-dev;openssl-dev;glib-dev;eudev-dev;libxml2-dev;libxslt-dev;libpng-dev;libjpeg-turbo-dev;tiff-dev;cups-dev;gmp-dev;mpfr-dev;mpc1-dev;ffmpeg-dev;gammu-dev;yaml-dev;openblas-dev;fftw-dev;lapack-dev;gfortran;blas-dev;eigen-dev;freetype-dev;glew-dev;harfbuzz-dev;hdf5-dev;libdc1394-dev;libtbb-dev;mesa-dev;openexr-dev;openjpeg-dev;uchardet-dev" skip-binary: aiohttp;grpcio;sqlalchemy;protobuf legacy: true constraints: "homeassistant/package_constraints.txt" diff --git a/homeassistant/components/azure_service_bus/notify.py b/homeassistant/components/azure_service_bus/notify.py index 4005460ecae..b318c5224df 100644 --- a/homeassistant/components/azure_service_bus/notify.py +++ b/homeassistant/components/azure_service_bus/notify.py @@ -4,8 +4,13 @@ from __future__ import annotations import json import logging +# pylint: disable-next=import-error, no-name-in-module from azure.servicebus import ServiceBusMessage + +# pylint: disable-next=import-error, no-name-in-module from azure.servicebus.aio import ServiceBusClient, ServiceBusSender + +# pylint: disable-next=import-error, no-name-in-module from azure.servicebus.exceptions import ( MessagingEntityNotFoundError, ServiceBusConnectionError, diff --git a/requirements_all.txt b/requirements_all.txt index 9793f8dff57..06b6dd9df6e 100644 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -404,7 +404,7 @@ axis==47 azure-eventhub==5.11.1 # homeassistant.components.azure_service_bus -azure-servicebus==7.8.0 +# azure-servicebus==7.8.0 # homeassistant.components.baidu baidu-aip==1.6.6 diff --git a/script/gen_requirements_all.py b/script/gen_requirements_all.py index 7c042f2044b..725c728607b 100755 --- a/script/gen_requirements_all.py +++ b/script/gen_requirements_all.py @@ -23,6 +23,7 @@ COMMENT_REQUIREMENTS = ( "Adafruit_BBIO", "avea", # depends on bluepy "avion", + "azure-servicebus", # depends on uamqp, which requires OpenSSL 1.1 "beacontools", "beewi_smartclim", # depends on bluepy "bluepy",