From 14af6d3884b5d4e319463c59a2633af57f5d6acc Mon Sep 17 00:00:00 2001 From: Franck Nijhof Date: Wed, 28 Apr 2021 22:43:40 +0200 Subject: [PATCH] Remove DHT from Raspberry Pi machine builds (#49829) --- machine/raspberrypi | 15 --------------- machine/raspberrypi2 | 15 --------------- machine/raspberrypi3 | 15 --------------- machine/raspberrypi3-64 | 15 --------------- machine/raspberrypi4 | 15 --------------- machine/raspberrypi4-64 | 15 --------------- script/gen_requirements_all.py | 1 - 7 files changed, 91 deletions(-) diff --git a/machine/raspberrypi b/machine/raspberrypi index d7add9bf63f..c9271aceccb 100644 --- a/machine/raspberrypi +++ b/machine/raspberrypi @@ -44,18 +44,3 @@ RUN apk add --no-cache \ && apk del .build-dependencies \ && rm -rf /usr/src/libcec ENV LD_LIBRARY_PATH=/opt/vc/lib:${LD_LIBRARY_PATH} - -## -# Install DHT -RUN apk add --no-cache --virtual .build-dependencies \ - gcc libc-dev raspberrypi-dev \ - && export DHT_VERSION="$(cat /usr/src/homeassistant/requirements_all.txt | sed -n 's|.*Adafruit-DHT==\([0-9\.]*\).*|\1|p')" \ - && git clone --depth 1 -b ${DHT_VERSION} https://github.com/adafruit/Adafruit_Python_DHT /usr/src/dht \ - && cd /usr/src/dht \ - && sed -i 's/^pi_version\ =\ None/pi_version\ =\ 1/' setup.py \ - && sed -i 's/^platform\ =\ platform_detect.UNKNOWN/platform\ =\ platform_detect.RASPBERRY_PI/' setup.py \ - && sed -i 's/platform\ =\ platform_detect.platform_detect()/pass/' setup.py \ - && export MAKEFLAGS="-j$(nproc)" \ - && pip3 install . \ - && apk del .build-dependencies \ - && rm -rf /usr/src/dht diff --git a/machine/raspberrypi2 b/machine/raspberrypi2 index 2643af911a4..d6c01b4ae02 100644 --- a/machine/raspberrypi2 +++ b/machine/raspberrypi2 @@ -44,18 +44,3 @@ RUN apk add --no-cache \ && apk del .build-dependencies \ && rm -rf /usr/src/libcec ENV LD_LIBRARY_PATH=/opt/vc/lib:${LD_LIBRARY_PATH} - -## -# Install DHT -RUN apk add --no-cache --virtual .build-dependencies \ - gcc libc-dev raspberrypi-dev \ - && export DHT_VERSION="$(cat /usr/src/homeassistant/requirements_all.txt | sed -n 's|.*Adafruit-DHT==\([0-9\.]*\).*|\1|p')" \ - && git clone --depth 1 -b ${DHT_VERSION} https://github.com/adafruit/Adafruit_Python_DHT /usr/src/dht \ - && cd /usr/src/dht \ - && sed -i 's/^pi_version\ =\ None/pi_version\ =\ 2/' setup.py \ - && sed -i 's/^platform\ =\ platform_detect.UNKNOWN/platform\ =\ platform_detect.RASPBERRY_PI/' setup.py \ - && sed -i 's/platform\ =\ platform_detect.platform_detect()/pass/' setup.py \ - && export MAKEFLAGS="-j$(nproc)" \ - && pip3 install . \ - && apk del .build-dependencies \ - && rm -rf /usr/src/dht diff --git a/machine/raspberrypi3 b/machine/raspberrypi3 index 5aed2308ef6..4509e150584 100644 --- a/machine/raspberrypi3 +++ b/machine/raspberrypi3 @@ -44,18 +44,3 @@ RUN apk add --no-cache \ && apk del .build-dependencies \ && rm -rf /usr/src/libcec ENV LD_LIBRARY_PATH=/opt/vc/lib:${LD_LIBRARY_PATH} - -## -# Install DHT -RUN apk add --no-cache --virtual .build-dependencies \ - gcc libc-dev raspberrypi-dev \ - && export DHT_VERSION="$(cat /usr/src/homeassistant/requirements_all.txt | sed -n 's|.*Adafruit-DHT==\([0-9\.]*\).*|\1|p')" \ - && git clone --depth 1 -b ${DHT_VERSION} https://github.com/adafruit/Adafruit_Python_DHT /usr/src/dht \ - && cd /usr/src/dht \ - && sed -i 's/^pi_version\ =\ None/pi_version\ =\ 3/' setup.py \ - && sed -i 's/^platform\ =\ platform_detect.UNKNOWN/platform\ =\ platform_detect.RASPBERRY_PI/' setup.py \ - && sed -i 's/platform\ =\ platform_detect.platform_detect()/pass/' setup.py \ - && export MAKEFLAGS="-j$(nproc)" \ - && pip3 install . \ - && apk del .build-dependencies \ - && rm -rf /usr/src/dht diff --git a/machine/raspberrypi3-64 b/machine/raspberrypi3-64 index 1b31726c879..97064a2377d 100644 --- a/machine/raspberrypi3-64 +++ b/machine/raspberrypi3-64 @@ -44,18 +44,3 @@ RUN apk add --no-cache \ && apk del .build-dependencies \ && rm -rf /usr/src/libcec ENV LD_LIBRARY_PATH=/opt/vc/lib:${LD_LIBRARY_PATH} - -## -# Install DHT -RUN apk add --no-cache --virtual .build-dependencies \ - gcc libc-dev raspberrypi-dev \ - && export DHT_VERSION="$(cat /usr/src/homeassistant/requirements_all.txt | sed -n 's|.*Adafruit-DHT==\([0-9\.]*\).*|\1|p')" \ - && git clone --depth 1 -b ${DHT_VERSION} https://github.com/adafruit/Adafruit_Python_DHT /usr/src/dht \ - && cd /usr/src/dht \ - && sed -i 's/^pi_version\ =\ None/pi_version\ =\ 3/' setup.py \ - && sed -i 's/^platform\ =\ platform_detect.UNKNOWN/platform\ =\ platform_detect.RASPBERRY_PI/' setup.py \ - && sed -i 's/platform\ =\ platform_detect.platform_detect()/pass/' setup.py \ - && export MAKEFLAGS="-j$(nproc)" \ - && pip3 install . \ - && apk del .build-dependencies \ - && rm -rf /usr/src/dht diff --git a/machine/raspberrypi4 b/machine/raspberrypi4 index 5aed2308ef6..4509e150584 100644 --- a/machine/raspberrypi4 +++ b/machine/raspberrypi4 @@ -44,18 +44,3 @@ RUN apk add --no-cache \ && apk del .build-dependencies \ && rm -rf /usr/src/libcec ENV LD_LIBRARY_PATH=/opt/vc/lib:${LD_LIBRARY_PATH} - -## -# Install DHT -RUN apk add --no-cache --virtual .build-dependencies \ - gcc libc-dev raspberrypi-dev \ - && export DHT_VERSION="$(cat /usr/src/homeassistant/requirements_all.txt | sed -n 's|.*Adafruit-DHT==\([0-9\.]*\).*|\1|p')" \ - && git clone --depth 1 -b ${DHT_VERSION} https://github.com/adafruit/Adafruit_Python_DHT /usr/src/dht \ - && cd /usr/src/dht \ - && sed -i 's/^pi_version\ =\ None/pi_version\ =\ 3/' setup.py \ - && sed -i 's/^platform\ =\ platform_detect.UNKNOWN/platform\ =\ platform_detect.RASPBERRY_PI/' setup.py \ - && sed -i 's/platform\ =\ platform_detect.platform_detect()/pass/' setup.py \ - && export MAKEFLAGS="-j$(nproc)" \ - && pip3 install . \ - && apk del .build-dependencies \ - && rm -rf /usr/src/dht diff --git a/machine/raspberrypi4-64 b/machine/raspberrypi4-64 index 1b31726c879..97064a2377d 100644 --- a/machine/raspberrypi4-64 +++ b/machine/raspberrypi4-64 @@ -44,18 +44,3 @@ RUN apk add --no-cache \ && apk del .build-dependencies \ && rm -rf /usr/src/libcec ENV LD_LIBRARY_PATH=/opt/vc/lib:${LD_LIBRARY_PATH} - -## -# Install DHT -RUN apk add --no-cache --virtual .build-dependencies \ - gcc libc-dev raspberrypi-dev \ - && export DHT_VERSION="$(cat /usr/src/homeassistant/requirements_all.txt | sed -n 's|.*Adafruit-DHT==\([0-9\.]*\).*|\1|p')" \ - && git clone --depth 1 -b ${DHT_VERSION} https://github.com/adafruit/Adafruit_Python_DHT /usr/src/dht \ - && cd /usr/src/dht \ - && sed -i 's/^pi_version\ =\ None/pi_version\ =\ 3/' setup.py \ - && sed -i 's/^platform\ =\ platform_detect.UNKNOWN/platform\ =\ platform_detect.RASPBERRY_PI/' setup.py \ - && sed -i 's/platform\ =\ platform_detect.platform_detect()/pass/' setup.py \ - && export MAKEFLAGS="-j$(nproc)" \ - && pip3 install . \ - && apk del .build-dependencies \ - && rm -rf /usr/src/dht diff --git a/script/gen_requirements_all.py b/script/gen_requirements_all.py index af06542d744..23d13ee9de9 100755 --- a/script/gen_requirements_all.py +++ b/script/gen_requirements_all.py @@ -13,7 +13,6 @@ from script.hassfest.model import Integration COMMENT_REQUIREMENTS = ( "Adafruit_BBIO", - "Adafruit-DHT", "avea", # depends on bluepy "avion", "beacontools",