Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removed python2 dependency for sonic-pcied in sonic-platform-daemons #10421

Merged
merged 3 commits into from
Apr 9, 2022
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ dependent_startup_wait_for=rsyslogd:running

{% if not skip_pcied %}
[program:pcied]
command={% if API_VERSION == 3 and 'pcied' not in python2_daemons %}python3 {% else %} python2 {% endif %}/usr/local/bin/pcied
command= python3 /usr/local/bin/pcied
Copy link
Collaborator

@qiluo-msft qiluo-msft Apr 7, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

python3

You can just remove python3 because there is correct shebang line inside the script.

And remove the blank before after =. #Closed

priority=11
autostart=false
autorestart=unexpected
Expand Down
6 changes: 0 additions & 6 deletions rules/sonic-pcied.dep
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,6 @@ DEP_FILES:= $(SONIC_COMMON_FILES_LIST) rules/sonic-pcied.mk rules/sonic-pcied.de
DEP_FILES+= $(SONIC_COMMON_BASE_FILES_LIST)
SMDEP_FILES:= $(addprefix $(SPATH)/,$(shell cd $(SPATH) && git ls-files))

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

$(SONIC_PCIED_PY3)_CACHE_MODE:= GIT_CONTENT_SHA
$(SONIC_PCIED_PY3)_DEP_FLAGS:= $(SONIC_COMMON_FLAGS_LIST)
$(SONIC_PCIED_PY3)_DEP_FILES:= $(DEP_FILES)
Expand Down
10 changes: 1 addition & 9 deletions rules/sonic-pcied.mk
Original file line number Diff line number Diff line change
@@ -1,17 +1,9 @@
# sonic-pcied (SONiC PCIe Monitor daemon) Debian package

# SONIC_PCIED_PY2 package

SONIC_PCIED_PY2 = sonic_pcied-1.0-py2-none-any.whl
$(SONIC_PCIED_PY2)_SRC_PATH = $(SRC_PATH)/sonic-platform-daemons/sonic-pcied
$(SONIC_PCIED_PY2)_DEPENDS = $(SONIC_PY_COMMON_PY2)
$(SONIC_PCIED_PY2)_PYTHON_VERSION = 2
SONIC_PYTHON_WHEELS += $(SONIC_PCIED_PY2)

# SONIC_PCIED_PY3 package

SONIC_PCIED_PY3 = sonic_pcied-1.0-py3-none-any.whl
$(SONIC_PCIED_PY3)_SRC_PATH = $(SRC_PATH)/sonic-platform-daemons/sonic-pcied
$(SONIC_PCIED_PY3)_DEPENDS = $(SONIC_PY_COMMON_PY3) $(SONIC_PCIED_PY2)
$(SONIC_PCIED_PY3)_DEPENDS = $(SONIC_PY_COMMON_PY3)
$(SONIC_PCIED_PY3)_PYTHON_VERSION = 3
SONIC_PYTHON_WHEELS += $(SONIC_PCIED_PY3)