From ce51894d342e170681658954b6c6b4db4c5cbeac Mon Sep 17 00:00:00 2001 From: vdahiya12 <67608553+vdahiya12@users.noreply.github.com> Date: Thu, 12 Aug 2021 12:53:52 -0700 Subject: [PATCH] [Y-Cable] add the definition inside setup.py to include sonic_y_cable.credo as a package (#211) Signed-off-by: vaibhav-dahiya Curreently the way python wheel includes packages is all the subdirectories inside a package need to be also included for them to be a package. Since in the refactor for multiple vendor Y-Cable xcvrd calls these vendor specific modules by including their name which it obtains by reading the eeprom it is required to include them inside setup.py for the wheel to know it has a package. Signed-off-by: vaibhav-dahiya vdahiya@microsoft.com Description add the definition inside setup.py to include sonic_y_cabe.credo as a package Motivation and Context This is required by all calling API's for vendor agnostic Y-Cable API's to be called for credo specific cables. How Has This Been Tested? Built an image and validated the presence of the pacakge. Ran the API's on a Arista7050cx3 switch. --- setup.py | 1 + sonic_y_cable/credo/__init__.py | 0 2 files changed, 1 insertion(+) create mode 100644 sonic_y_cable/credo/__init__.py diff --git a/setup.py b/setup.py index 504817fafcb0..de33724fcf73 100644 --- a/setup.py +++ b/setup.py @@ -24,6 +24,7 @@ 'sonic_sfp', 'sonic_thermal', 'sonic_y_cable', + 'sonic_y_cable.credo', ], # NOTE: Install also depends on sonic-config-engine for portconfig.py # This dependency should be eliminated by moving portconfig.py diff --git a/sonic_y_cable/credo/__init__.py b/sonic_y_cable/credo/__init__.py new file mode 100644 index 000000000000..e69de29bb2d1