Skip to content

Commit

Permalink
[build] Build/install remaining platform daemons as Python wheel pack…
Browse files Browse the repository at this point in the history
…ages (sonic-net#5188)

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. ledd and psud were converted in earlier PRs. This PR converts the remainder:

- pcied
- syseepromd
- thermalctld
- xcvrd
  • Loading branch information
jleveque authored and santhosh-kt committed Feb 25, 2021
1 parent dc0cea8 commit 1f8b297
Show file tree
Hide file tree
Showing 9 changed files with 29 additions and 28 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ dependent_startup_wait_for=start:exited

{% if not skip_xcvrd %}
[program:xcvrd]
command=/usr/bin/xcvrd
command=/usr/local/bin/xcvrd
priority=6
autostart=false
autorestart=false
Expand All @@ -104,7 +104,7 @@ dependent_startup_wait_for=start:exited

{% if not skip_syseepromd %}
[program:syseepromd]
command=/usr/bin/syseepromd
command=/usr/local/bin/syseepromd
priority=8
autostart=false
autorestart=unexpected
Expand All @@ -117,7 +117,7 @@ dependent_startup_wait_for=start:exited

{% if not skip_thermalctld %}
[program:thermalctld]
command=/usr/bin/thermalctld
command=/usr/local/bin/thermalctld
priority=9
autostart=false
autorestart=unexpected
Expand All @@ -130,7 +130,7 @@ dependent_startup_wait_for=start:exited

{% if not skip_pcied %}
[program:pcied]
command=/usr/bin/pcied
command=/usr/local/bin/pcied
priority=10
autostart=false
autorestart=unexpected
Expand Down
5 changes: 4 additions & 1 deletion rules/docker-platform-monitor.mk
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,16 @@ $(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_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_PCIED)
$(DOCKER_PLATFORM_MONITOR)_PYTHON_WHEELS += $(SONIC_PSUD)
$(DOCKER_PLATFORM_MONITOR)_PYTHON_WHEELS += $(SONIC_SYSEEPROMD)
$(DOCKER_PLATFORM_MONITOR)_PYTHON_WHEELS += $(SONIC_THERMALCTLD)
$(DOCKER_PLATFORM_MONITOR)_PYTHON_WHEELS += $(SONIC_XCVRD)

$(DOCKER_PLATFORM_MONITOR)_DBG_DEPENDS = $($(DOCKER_CONFIG_ENGINE_BUSTER)_DBG_DEPENDS)
$(DOCKER_PLATFORM_MONITOR)_DBG_DEPENDS += $(LIBSWSSCOMMON_DBG) $(LIBSENSORS_DBG)
Expand Down
7 changes: 4 additions & 3 deletions rules/sonic-pcied.mk
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# sonic-pcied (SONiC PCIe Monitor daemon) Debian package

SONIC_PCIED = python-sonic-pcied_1.0-1_all.deb
SONIC_PCIED = sonic_pcied-1.0-py2-none-any.whl
$(SONIC_PCIED)_SRC_PATH = $(SRC_PATH)/sonic-platform-daemons/sonic-pcied
$(SONIC_PCIED)_WHEEL_DEPENDS = $(SONIC_PY_COMMON_PY2)
SONIC_PYTHON_STDEB_DEBS += $(SONIC_PCIED)
$(SONIC_PCIED)_DEPENDS = $(SONIC_PY_COMMON_PY2)
$(SONIC_PCIED)_PYTHON_VERSION = 2
SONIC_PYTHON_WHEELS += $(SONIC_PCIED)
6 changes: 2 additions & 4 deletions rules/sonic-syseepromd.dep
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@

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

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

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

SONIC_SYSEEPROMD = python-sonic-syseepromd_1.0-1_all.deb
SONIC_SYSEEPROMD = sonic_syseepromd-1.0-py2-none-any.whl
$(SONIC_SYSEEPROMD)_SRC_PATH = $(SRC_PATH)/sonic-platform-daemons/sonic-syseepromd
$(SONIC_SYSEEPROMD)_WHEEL_DEPENDS = $(SONIC_PY_COMMON_PY2)
SONIC_PYTHON_STDEB_DEBS += $(SONIC_SYSEEPROMD)
$(SONIC_SYSEEPROMD)_DEPENDS = $(SONIC_PY_COMMON_PY2)
$(SONIC_SYSEEPROMD)_PYTHON_VERSION = 2
SONIC_PYTHON_WHEELS += $(SONIC_SYSEEPROMD)
4 changes: 1 addition & 3 deletions rules/sonic-thermalctld.dep
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@

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

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

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

SONIC_THERMALCTLD = python-sonic-thermalctld_1.0-1_all.deb
SONIC_THERMALCTLD = sonic_thermalctld-1.0-py2-none-any.whl
$(SONIC_THERMALCTLD)_SRC_PATH = $(SRC_PATH)/sonic-platform-daemons/sonic-thermalctld
$(SONIC_THERMALCTLD)_WHEEL_DEPENDS = $(SONIC_PY_COMMON_PY2)
SONIC_PYTHON_STDEB_DEBS += $(SONIC_THERMALCTLD)
$(SONIC_THERMALCTLD)_DEPENDS = $(SONIC_PY_COMMON_PY2)
$(SONIC_THERMALCTLD)_PYTHON_VERSION = 2
SONIC_PYTHON_WHEELS += $(SONIC_THERMALCTLD)
6 changes: 2 additions & 4 deletions rules/sonic-xcvrd.dep
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@

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

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

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

SONIC_XCVRD = python-sonic-xcvrd_1.0-1_all.deb
SONIC_XCVRD = sonic_xcvrd-1.0-py2-none-any.whl
$(SONIC_XCVRD)_SRC_PATH = $(SRC_PATH)/sonic-platform-daemons/sonic-xcvrd
$(SONIC_XCVRD)_WHEEL_DEPENDS = $(SONIC_PY_COMMON_PY2)
SONIC_PYTHON_STDEB_DEBS += $(SONIC_XCVRD)
$(SONIC_XCVRD)_DEPENDS = $(SONIC_PY_COMMON_PY2)
$(SONIC_XCVRD)_PYTHON_VERSION = 2
SONIC_PYTHON_WHEELS += $(SONIC_XCVRD)

0 comments on commit 1f8b297

Please sign in to comment.