Skip to content

Commit

Permalink
[build] Build/install sonic-psud as a Python wheel package (#5182)
Browse files Browse the repository at this point in the history
As part of migrating all Python-based package installers to wheel format rather than Debian packages. Also to allow for easily building a Python 3 version of the package in the near future.
  • Loading branch information
jleveque authored Aug 14, 2020
1 parent 6c89551 commit c3202d8
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ dependent_startup_wait_for=start:exited

{% if not skip_psud %}
[program:psud]
command=/usr/bin/psud
command=/usr/local/bin/psud
priority=7
autostart=false
autorestart=false
Expand Down
3 changes: 2 additions & 1 deletion rules/docker-platform-monitor.mk
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,13 @@ $(DOCKER_PLATFORM_MONITOR)_DEPENDS += $(LIBSENSORS) $(LM_SENSORS) $(FANCONTROL)
ifeq ($(CONFIGURED_PLATFORM),barefoot)
$(DOCKER_PLATFORM_MONITOR)_DEPENDS += $(PYTHON_THRIFT)
endif
$(DOCKER_PLATFORM_MONITOR)_PYTHON_DEBS += $(SONIC_XCVRD) $(SONIC_PSUD) $(SONIC_SYSEEPROMD) $(SONIC_THERMALCTLD) $(SONIC_PCIED)
$(DOCKER_PLATFORM_MONITOR)_PYTHON_DEBS += $(SONIC_XCVRD) $(SONIC_SYSEEPROMD) $(SONIC_THERMALCTLD) $(SONIC_PCIED)
$(DOCKER_PLATFORM_MONITOR)_PYTHON_WHEELS += $(SONIC_PLATFORM_COMMON_PY2)
$(DOCKER_PLATFORM_MONITOR)_PYTHON_WHEELS += $(SWSSSDK_PY2)
$(DOCKER_PLATFORM_MONITOR)_PYTHON_WHEELS += $(SONIC_PY_COMMON_PY2)
$(DOCKER_PLATFORM_MONITOR)_PYTHON_WHEELS += $(SONIC_PLATFORM_API_PY2)
$(DOCKER_PLATFORM_MONITOR)_PYTHON_WHEELS += $(SONIC_LEDD)
$(DOCKER_PLATFORM_MONITOR)_PYTHON_WHEELS += $(SONIC_PSUD)

$(DOCKER_PLATFORM_MONITOR)_DBG_DEPENDS = $($(DOCKER_CONFIG_ENGINE_BUSTER)_DBG_DEPENDS)
$(DOCKER_PLATFORM_MONITOR)_DBG_DEPENDS += $(LIBSWSSCOMMON_DBG) $(LIBSENSORS_DBG)
Expand Down
6 changes: 2 additions & 4 deletions rules/sonic-psud.dep
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@

SPATH := $($(SONIC_PSUD)_SRC_PATH)
DEP_FILES := $(SONIC_COMMON_FILES_LIST) rules/sonic-psud.mk rules/sonic-psud.dep
DEP_FILES := $(SONIC_COMMON_FILES_LIST) rules/sonic-psud.mk rules/sonic-psud.dep
DEP_FILES += $(SONIC_COMMON_BASE_FILES_LIST)
SMDEP_FILES := $(addprefix $(SPATH)/,$(shell cd $(SPATH) && git ls-files))

$(SONIC_PSUD)_CACHE_MODE := GIT_CONTENT_SHA
$(SONIC_PSUD)_CACHE_MODE := GIT_CONTENT_SHA
$(SONIC_PSUD)_DEP_FLAGS := $(SONIC_COMMON_FLAGS_LIST)
$(SONIC_PSUD)_DEP_FILES := $(DEP_FILES)
$(SONIC_PSUD)_SMDEP_FILES := $(SMDEP_FILES)
$(SONIC_PSUD)_SMDEP_PATHS := $(SPATH)

7 changes: 4 additions & 3 deletions rules/sonic-psud.mk
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# sonic-psud (SONiC PSU daemon) Debian package

SONIC_PSUD = python-sonic-psud_1.0-1_all.deb
SONIC_PSUD = sonic_psud-1.0-py2-none-any.whl
$(SONIC_PSUD)_SRC_PATH = $(SRC_PATH)/sonic-platform-daemons/sonic-psud
$(SONIC_PSUD)_WHEEL_DEPENDS = $(SONIC_PY_COMMON_PY2)
SONIC_PYTHON_STDEB_DEBS += $(SONIC_PSUD)
$(SONIC_PSUD)_DEPENDS = $(SONIC_PY_COMMON_PY2)
$(SONIC_PSUD)_PYTHON_VERSION = 2
SONIC_PYTHON_WHEELS += $(SONIC_PSUD)

0 comments on commit c3202d8

Please sign in to comment.