diff --git a/docker/local_history_service/Dockerfile b/docker/local_history_service/Dockerfile index 271106af..6506cb2e 100644 --- a/docker/local_history_service/Dockerfile +++ b/docker/local_history_service/Dockerfile @@ -8,7 +8,9 @@ RUN apk add --no-cache \ bash \ build-base \ make \ + cmake \ musl-dev \ + dpkg \ elogind-dev \ python3-dev \ py3-gobject3 \ diff --git a/docker/rtc_service/Dockerfile b/docker/rtc_service/Dockerfile index 7bdba2a3..423d55d7 100644 --- a/docker/rtc_service/Dockerfile +++ b/docker/rtc_service/Dockerfile @@ -7,7 +7,9 @@ RUN apk add --no-cache \ bash \ build-base \ make \ + cmake \ musl-dev \ + dpkg \ elogind-dev \ python3-dev \ py3-gobject3 \ diff --git a/docker/sink_service/Dockerfile b/docker/sink_service/Dockerfile index beff0beb..436642f5 100644 --- a/docker/sink_service/Dockerfile +++ b/docker/sink_service/Dockerfile @@ -5,7 +5,7 @@ ARG GATEWAY_BUILD_SHA1=unset RUN adduser --disabled-password wirepas -RUN apk add --no-cache gcc make musl-dev elogind-dev linux-headers +RUN apk add --no-cache gcc make cmake musl-dev dpkg elogind-dev linux-headers USER wirepas diff --git a/docker/transport_service/Dockerfile b/docker/transport_service/Dockerfile index 8bf04cb1..31267d87 100644 --- a/docker/transport_service/Dockerfile +++ b/docker/transport_service/Dockerfile @@ -7,7 +7,9 @@ RUN apk add --no-cache \ bash \ build-base \ make \ + cmake \ musl-dev \ + dpkg \ elogind-dev \ python3-dev \ py3-gobject3 \ diff --git a/python_transport/utils/generate_wheel.sh b/python_transport/utils/generate_wheel.sh index deedc774..c01916f1 100755 --- a/python_transport/utils/generate_wheel.sh +++ b/python_transport/utils/generate_wheel.sh @@ -5,6 +5,25 @@ set -e rm -r build || true rm -r dist || true -py3clean . || true +pip install pyclean +python3 -m pyclean . || true python3 setup.py clean --all python3 setup.py sdist bdist_wheel + +if ! command -v dpkg &>/dev/null; then + echo "dpkg could not be found!" + exit 1 +fi + +# In RaspberryPI, pip does not support the wheel file name suffix of linux_aarch64.whl which comes from OS architecture query to the OS itself of Python setuptools. +# Supported pip wheel file suffixes (pip compatible tags) listed using "pip debug --verbose" which doesn't include linux_aarch64 in RaspberryPI, +# and pip complains as the wheel file is not supported in this platform. +# Therefore, "linux_aarch64" file name suffix is changed with widely supported "py3-none-any" if dpkg architecture is "musl-linux-armhf"(possibly RaspberryPI). +muslv=$(dpkg --print-architecture) +if [ "$muslv" = "musl-linux-armhf" ]; then + package_name=$(ls dist/*.tar.gz) + new_whl_file=$(basename "$package_name" .tar.gz)-py3-none-any.whl + old_whl_file=$(ls dist/*.whl) + mv "$old_whl_file" "dist/${new_whl_file}" + echo "WARNING: wirepas_gateway wheel file name changed for due to ARMHF OS architecture(possibly RaspberryPI) : dist/$new_whl_file" +fi