From 0eae6fd48d627b204ca1b1c37406d45ee71e75df Mon Sep 17 00:00:00 2001 From: Fabio Manganiello Date: Fri, 20 Oct 2023 00:09:11 +0200 Subject: [PATCH] Misc dependencies and mock fixes. - `iputils` should be an explicit system dependency for `ping`. Some minimal systems (like some Docker images) may not have the `ping` command installed out of the box. - `hid` and `marshmallow_dataclass` should be among the auto-mocked modules. --- .drone.yml | 4 ++-- platypush/backend/ping/manifest.yaml | 8 +++++++- platypush/plugins/ping/manifest.yaml | 8 +++++++- platypush/utils/mock/modules.py | 2 ++ 4 files changed, 18 insertions(+), 4 deletions(-) diff --git a/.drone.yml b/.drone.yml index 093e78e96..034f1d604 100644 --- a/.drone.yml +++ b/.drone.yml @@ -113,8 +113,8 @@ steps: commands: - echo "Installing required build dependencies" - - apk add --update --no-cache make py3-sphinx py3-myst-parser py3-pip py3-paho-mqtt $(cat platypush/install/requirements/alpine.txt) - - pip install -U hid sphinx-rtd-theme sphinx-book-theme + - apk add --update --no-cache make py3-sphinx py3-myst-parser py3-pip $(cat platypush/install/requirements/alpine.txt) + - pip install -U sphinx-rtd-theme sphinx-book-theme - pip install . - mkdir -p /docs/current - export APPDIR=$PWD diff --git a/platypush/backend/ping/manifest.yaml b/platypush/backend/ping/manifest.yaml index 6c59f9224..d9900d385 100644 --- a/platypush/backend/ping/manifest.yaml +++ b/platypush/backend/ping/manifest.yaml @@ -3,6 +3,12 @@ manifest: platypush.message.event.ping.HostDownEvent: if a host stops responding ping requests platypush.message.event.ping.HostUpEvent: if a host starts responding ping requests install: - pip: [] + apt: + - iputils-ping + dnf: + - iputils + pacman: + - iputils + package: platypush.backend.ping type: backend diff --git a/platypush/plugins/ping/manifest.yaml b/platypush/plugins/ping/manifest.yaml index 8d7984be3..57800cd41 100644 --- a/platypush/plugins/ping/manifest.yaml +++ b/platypush/plugins/ping/manifest.yaml @@ -1,6 +1,12 @@ manifest: events: {} install: - pip: [] + apt: + - iputils-ping + dnf: + - iputils + pacman: + - iputils + package: platypush.plugins.ping type: plugin diff --git a/platypush/utils/mock/modules.py b/platypush/utils/mock/modules.py index a84299acb..14aed19ab 100644 --- a/platypush/utils/mock/modules.py +++ b/platypush/utils/mock/modules.py @@ -45,6 +45,7 @@ mock_imports = [ "graphyte", "grpc", "gunicorn", + "hid", "httplib2", "icalendar", "imapclient", @@ -60,6 +61,7 @@ mock_imports = [ "keras", "linode_api4", "luma", + "marshmallow_dataclass", "mpd", "ndef", "nfc",