[build] Build/install sonic-psud as a Python wheel package (#5182)

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.
This commit is contained in:
Joe LeVeque 2020-08-14 11:11:45 -07:00 коммит произвёл GitHub
Родитель 6c895513ac
Коммит c3202d8982
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
4 изменённых файлов: 9 добавлений и 9 удалений

Просмотреть файл

@ -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

Просмотреть файл

@ -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)

Просмотреть файл

@ -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)

Просмотреть файл

@ -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)