From 8ccdb9bb57426a418a95f9e5c8b9140c34ff39af Mon Sep 17 00:00:00 2001 From: chiourung_huang Date: Tue, 14 Sep 2021 06:28:17 +0000 Subject: [PATCH] [Accton] Don't include other platforms' python package Signed-off-by: chiourung_huang --- .../sonic-platform-modules-accton/as4630-54pe/setup.py | 2 +- .../sonic-platform-modules-accton/as4630-54te/setup.py | 2 +- .../sonic-platform-modules-accton/as5712-54x/setup.py | 2 +- .../sonic-platform-modules-accton/as5812-54t/setup.py | 2 +- .../sonic-platform-modules-accton/as5812-54x/setup.py | 2 +- .../sonic-platform-modules-accton/as5835-54t/setup.py | 2 +- .../sonic-platform-modules-accton/as5835-54x/setup.py | 2 +- .../sonic-platform-modules-accton/as6712-32x/setup.py | 2 +- .../sonic-platform-modules-accton/as7312-54x/setup.py | 2 +- .../sonic-platform-modules-accton/as7312-54xs/setup.py | 2 +- .../sonic-platform-modules-accton/as7315-27xb/setup.py | 2 +- .../sonic-platform-modules-accton/as7326-56x/setup.py | 2 +- .../sonic-platform-modules-accton/as7712-32x/setup.py | 2 +- .../sonic-platform-modules-accton/as7716-32x/setup.py | 2 +- .../sonic-platform-modules-accton/as7716-32xb/setup.py | 2 +- .../sonic-platform-modules-accton/as7726-32x/setup.py | 2 +- .../sonic-platform-modules-accton/as7816-64x/setup.py | 2 +- .../sonic-platform-modules-accton/as9716-32d/setup.py | 2 +- .../sonic-platform-modules-accton/as9726-32d/setup.py | 2 +- .../broadcom/sonic-platform-modules-accton/debian/rules | 6 ++++-- .../sonic-platform-modules-accton/minipack/setup.py | 4 ++-- 21 files changed, 25 insertions(+), 23 deletions(-) diff --git a/platform/broadcom/sonic-platform-modules-accton/as4630-54pe/setup.py b/platform/broadcom/sonic-platform-modules-accton/as4630-54pe/setup.py index 34e6bb59de52..22db82c04957 100755 --- a/platform/broadcom/sonic-platform-modules-accton/as4630-54pe/setup.py +++ b/platform/broadcom/sonic-platform-modules-accton/as4630-54pe/setup.py @@ -11,6 +11,6 @@ description='Module to initialize Accton AS4630-54PE platforms', packages=['as4630_54pe'], - package_dir={'as4630_54pe': 'as4630-54pe/classes'}, + package_dir={'as4630_54pe': 'classes'}, ) diff --git a/platform/broadcom/sonic-platform-modules-accton/as4630-54te/setup.py b/platform/broadcom/sonic-platform-modules-accton/as4630-54te/setup.py index 78b45368c791..1c80604e941a 100755 --- a/platform/broadcom/sonic-platform-modules-accton/as4630-54te/setup.py +++ b/platform/broadcom/sonic-platform-modules-accton/as4630-54te/setup.py @@ -10,5 +10,5 @@ description='Module to initialize Accton AS4630-54TE platforms', packages=['as4630_54te'], - package_dir={'as4630_54te': 'as4630-54te/classes'}, + package_dir={'as4630_54te': 'classes'}, ) diff --git a/platform/broadcom/sonic-platform-modules-accton/as5712-54x/setup.py b/platform/broadcom/sonic-platform-modules-accton/as5712-54x/setup.py index f4cb5f960a4d..61356a299ba3 100755 --- a/platform/broadcom/sonic-platform-modules-accton/as5712-54x/setup.py +++ b/platform/broadcom/sonic-platform-modules-accton/as5712-54x/setup.py @@ -11,6 +11,6 @@ description='Module to initialize Accton AS5712-54X platforms', packages=['as5712_54x'], - package_dir={'as5712_54x': 'as5712-54x/classes'}, + package_dir={'as5712_54x': 'classes'}, ) diff --git a/platform/broadcom/sonic-platform-modules-accton/as5812-54t/setup.py b/platform/broadcom/sonic-platform-modules-accton/as5812-54t/setup.py index 0af58ba919bc..b009e573b65b 100755 --- a/platform/broadcom/sonic-platform-modules-accton/as5812-54t/setup.py +++ b/platform/broadcom/sonic-platform-modules-accton/as5812-54t/setup.py @@ -11,6 +11,6 @@ description='Module to initialize Accton AS5812-54X platforms', packages=['as5812_54t'], - package_dir={'as5812_54t': 'as5812-54t/classes'}, + package_dir={'as5812_54t': 'classes'}, ) diff --git a/platform/broadcom/sonic-platform-modules-accton/as5812-54x/setup.py b/platform/broadcom/sonic-platform-modules-accton/as5812-54x/setup.py index aa8615fd8a88..8a2c42eb5d75 100755 --- a/platform/broadcom/sonic-platform-modules-accton/as5812-54x/setup.py +++ b/platform/broadcom/sonic-platform-modules-accton/as5812-54x/setup.py @@ -11,6 +11,6 @@ description='Module to initialize Accton AS5812-54X platforms', packages=['as5812_54x'], - package_dir={'as5812_54x': 'as5812-54x/classes'}, + package_dir={'as5812_54x': 'classes'}, ) diff --git a/platform/broadcom/sonic-platform-modules-accton/as5835-54t/setup.py b/platform/broadcom/sonic-platform-modules-accton/as5835-54t/setup.py index ac880c41e4e0..d961724616f6 100644 --- a/platform/broadcom/sonic-platform-modules-accton/as5835-54t/setup.py +++ b/platform/broadcom/sonic-platform-modules-accton/as5835-54t/setup.py @@ -11,6 +11,6 @@ description='Module to initialize Accton AS5835-54T platforms', packages=['as5835_54t'], - package_dir={'as5835_54t': 'as5835-54t/classes'}, + package_dir={'as5835_54t': 'classes'}, ) diff --git a/platform/broadcom/sonic-platform-modules-accton/as5835-54x/setup.py b/platform/broadcom/sonic-platform-modules-accton/as5835-54x/setup.py index af0320318ea6..8e8029a25744 100644 --- a/platform/broadcom/sonic-platform-modules-accton/as5835-54x/setup.py +++ b/platform/broadcom/sonic-platform-modules-accton/as5835-54x/setup.py @@ -11,6 +11,6 @@ description='Module to initialize Accton AS5835-54X platforms', packages=['as5835_54x'], - package_dir={'as5835_54x': 'as5835-54x/classes'}, + package_dir={'as5835_54x': 'classes'}, ) diff --git a/platform/broadcom/sonic-platform-modules-accton/as6712-32x/setup.py b/platform/broadcom/sonic-platform-modules-accton/as6712-32x/setup.py index 114b0837be69..28be6dfb88c1 100644 --- a/platform/broadcom/sonic-platform-modules-accton/as6712-32x/setup.py +++ b/platform/broadcom/sonic-platform-modules-accton/as6712-32x/setup.py @@ -11,6 +11,6 @@ description='Module to initialize Accton AS6712-32X platforms', packages=['as6712_32x'], - package_dir={'as6712_32x': 'as6712-32x/classes'}, + package_dir={'as6712_32x': 'classes'}, ) diff --git a/platform/broadcom/sonic-platform-modules-accton/as7312-54x/setup.py b/platform/broadcom/sonic-platform-modules-accton/as7312-54x/setup.py index 5e862ce15048..8840f0f1edac 100755 --- a/platform/broadcom/sonic-platform-modules-accton/as7312-54x/setup.py +++ b/platform/broadcom/sonic-platform-modules-accton/as7312-54x/setup.py @@ -11,6 +11,6 @@ description='Module to initialize Accton AS7312-54X platforms', packages=['as7312_54x'], - package_dir={'as7312_54x': 'as7312-54x/classes'}, + package_dir={'as7312_54x': 'classes'}, ) diff --git a/platform/broadcom/sonic-platform-modules-accton/as7312-54xs/setup.py b/platform/broadcom/sonic-platform-modules-accton/as7312-54xs/setup.py index d1351ab3e597..4370c41f1d50 100755 --- a/platform/broadcom/sonic-platform-modules-accton/as7312-54xs/setup.py +++ b/platform/broadcom/sonic-platform-modules-accton/as7312-54xs/setup.py @@ -11,6 +11,6 @@ description='Module to initialize Accton AS7312-54XS platforms', packages=['as7312_54xs'], - package_dir={'as7312_54xs': 'as7312-54xs/classes'}, + package_dir={'as7312_54xs': 'classes'}, ) diff --git a/platform/broadcom/sonic-platform-modules-accton/as7315-27xb/setup.py b/platform/broadcom/sonic-platform-modules-accton/as7315-27xb/setup.py index 09187900c7ee..e17c72728ef9 100755 --- a/platform/broadcom/sonic-platform-modules-accton/as7315-27xb/setup.py +++ b/platform/broadcom/sonic-platform-modules-accton/as7315-27xb/setup.py @@ -11,6 +11,6 @@ description='Module to initialize Accton AS7315-27XB platforms', packages=['as7315_27xb'], - package_dir={'as7315_27xb': 'as7315-27xb/classes'}, + package_dir={'as7315_27xb': 'classes'}, ) diff --git a/platform/broadcom/sonic-platform-modules-accton/as7326-56x/setup.py b/platform/broadcom/sonic-platform-modules-accton/as7326-56x/setup.py index 77114c71285b..3b81bee1c973 100755 --- a/platform/broadcom/sonic-platform-modules-accton/as7326-56x/setup.py +++ b/platform/broadcom/sonic-platform-modules-accton/as7326-56x/setup.py @@ -11,6 +11,6 @@ description='Module to initialize Accton AS7326-56X platforms', packages=['as7326_56x'], - package_dir={'as7326_56x': 'as7326-56x/classes'}, + package_dir={'as7326_56x': 'classes'}, ) diff --git a/platform/broadcom/sonic-platform-modules-accton/as7712-32x/setup.py b/platform/broadcom/sonic-platform-modules-accton/as7712-32x/setup.py index 09c763c84f01..8d7435bbf733 100755 --- a/platform/broadcom/sonic-platform-modules-accton/as7712-32x/setup.py +++ b/platform/broadcom/sonic-platform-modules-accton/as7712-32x/setup.py @@ -11,6 +11,6 @@ description='Module to initialize Accton AS7712-32X platforms', packages=['as7712_32x'], - package_dir={'as7712_32x': 'as7712-32x/classes'}, + package_dir={'as7712_32x': 'classes'}, ) diff --git a/platform/broadcom/sonic-platform-modules-accton/as7716-32x/setup.py b/platform/broadcom/sonic-platform-modules-accton/as7716-32x/setup.py index 7a3d784d326e..be697951d9a2 100755 --- a/platform/broadcom/sonic-platform-modules-accton/as7716-32x/setup.py +++ b/platform/broadcom/sonic-platform-modules-accton/as7716-32x/setup.py @@ -11,6 +11,6 @@ description='Module to initialize Accton AS7716-32X platforms', packages=['as7716_32x'], - package_dir={'as7716_32x': 'as7716-32x/classes'}, + package_dir={'as7716_32x': 'classes'}, ) diff --git a/platform/broadcom/sonic-platform-modules-accton/as7716-32xb/setup.py b/platform/broadcom/sonic-platform-modules-accton/as7716-32xb/setup.py index 3edfc29b3817..37debf8b1634 100755 --- a/platform/broadcom/sonic-platform-modules-accton/as7716-32xb/setup.py +++ b/platform/broadcom/sonic-platform-modules-accton/as7716-32xb/setup.py @@ -11,6 +11,6 @@ description='Module to initialize Accton AS7716-32XB platforms', packages=['as7716_32xb'], - package_dir={'as7716_32xb': 'as7716-32xb/classes'}, + package_dir={'as7716_32xb': 'classes'}, ) diff --git a/platform/broadcom/sonic-platform-modules-accton/as7726-32x/setup.py b/platform/broadcom/sonic-platform-modules-accton/as7726-32x/setup.py index 9841874dbd1e..0c7d563297f5 100755 --- a/platform/broadcom/sonic-platform-modules-accton/as7726-32x/setup.py +++ b/platform/broadcom/sonic-platform-modules-accton/as7726-32x/setup.py @@ -11,6 +11,6 @@ description='Module to initialize Accton AS7726-32X platforms', packages=['as7726_32x'], - package_dir={'as7726_32x': 'as7726-32x/classes'}, + package_dir={'as7726_32x': 'classes'}, ) diff --git a/platform/broadcom/sonic-platform-modules-accton/as7816-64x/setup.py b/platform/broadcom/sonic-platform-modules-accton/as7816-64x/setup.py index 6633b9438b86..bdfbe0c57f52 100755 --- a/platform/broadcom/sonic-platform-modules-accton/as7816-64x/setup.py +++ b/platform/broadcom/sonic-platform-modules-accton/as7816-64x/setup.py @@ -11,6 +11,6 @@ description='Module to initialize Accton AS7816-64X platforms', packages=['as7816_64x'], - package_dir={'as7816_64x': 'as7816-64x/classes'}, + package_dir={'as7816_64x': 'classes'}, ) diff --git a/platform/broadcom/sonic-platform-modules-accton/as9716-32d/setup.py b/platform/broadcom/sonic-platform-modules-accton/as9716-32d/setup.py index 7c70492e5d6d..f316de02288a 100755 --- a/platform/broadcom/sonic-platform-modules-accton/as9716-32d/setup.py +++ b/platform/broadcom/sonic-platform-modules-accton/as9716-32d/setup.py @@ -11,6 +11,6 @@ description='Module to initialize Accton AS9716-32D platforms', packages=['as9716_32d'], - package_dir={'as9716_32d': 'as9716-32d/classes'}, + package_dir={'as9716_32d': 'classes'}, ) diff --git a/platform/broadcom/sonic-platform-modules-accton/as9726-32d/setup.py b/platform/broadcom/sonic-platform-modules-accton/as9726-32d/setup.py index 7b84a9cab7ec..bc6bad7edfd2 100755 --- a/platform/broadcom/sonic-platform-modules-accton/as9726-32d/setup.py +++ b/platform/broadcom/sonic-platform-modules-accton/as9726-32d/setup.py @@ -10,5 +10,5 @@ description='Module to initialize Accton AS9726_32D platforms', packages=['as9726_32d'], - package_dir={'as9726_32d': 'as9726-32d/classes'}, + package_dir={'as9726_32d': 'classes'}, ) diff --git a/platform/broadcom/sonic-platform-modules-accton/debian/rules b/platform/broadcom/sonic-platform-modules-accton/debian/rules index 826a3217dc86..dacd0f3a1c30 100755 --- a/platform/broadcom/sonic-platform-modules-accton/debian/rules +++ b/platform/broadcom/sonic-platform-modules-accton/debian/rules @@ -40,8 +40,8 @@ build: #make modules -C $(KERNEL_SRC)/build M=$(MODULE_SRC) (for mod in $(MODULE_DIRS); do \ make modules -C $(KERNEL_SRC)/build M=$(MOD_SRC_DIR)/$${mod}/modules; \ - $(PYTHON) $${mod}/setup.py build; \ cd $(MOD_SRC_DIR)/$${mod}; \ + $(PYTHON) setup.py build; \ if [ -f sonic_platform_setup.py ]; then \ $(PYTHON3) sonic_platform_setup.py bdist_wheel -d $(MOD_SRC_DIR)/$${mod}; \ echo "Finished makig whl package for $$mod"; \ @@ -73,7 +73,9 @@ binary-indep: cp $(MOD_SRC_DIR)/$${mod}/$(MODULE_DIR)/*.ko debian/$(PACKAGE_PRE_NAME)-$${mod}/$(KERNEL_SRC)/$(INSTALL_MOD_DIR); \ cp $(MOD_SRC_DIR)/$${mod}/$(UTILS_DIR)/* debian/$(PACKAGE_PRE_NAME)-$${mod}/usr/local/bin/; \ cp $(MOD_SRC_DIR)/$${mod}/$(SERVICE_DIR)/*.service debian/$(PACKAGE_PRE_NAME)-$${mod}/lib/systemd/system/; \ - $(PYTHON) $${mod}/setup.py install --root=$(MOD_SRC_DIR)/debian/$(PACKAGE_PRE_NAME)-$${mod} --install-layout=deb; \ + cd $(MOD_SRC_DIR)/$${mod}; \ + $(PYTHON) setup.py install --root=$(MOD_SRC_DIR)/debian/$(PACKAGE_PRE_NAME)-$${mod} --install-layout=deb; \ + cd -; \ done) # Resuming debhelper scripts dh_testroot diff --git a/platform/broadcom/sonic-platform-modules-accton/minipack/setup.py b/platform/broadcom/sonic-platform-modules-accton/minipack/setup.py index b5d08c090bab..ae350b71ba85 100755 --- a/platform/broadcom/sonic-platform-modules-accton/minipack/setup.py +++ b/platform/broadcom/sonic-platform-modules-accton/minipack/setup.py @@ -5,7 +5,7 @@ from setuptools import setup, Extension os.listdir -module1 = Extension("fbfpgaio", sources = ["minipack/lib/fbfpgaiomodule.c"]) +module1 = Extension("fbfpgaio", sources = ["lib/fbfpgaiomodule.c"]) setup( name='minipack', @@ -13,7 +13,7 @@ description='Module to initialize Accton MiniPack platforms', packages=['minipack'], - package_dir={'minipack': 'minipack/classes'}, + package_dir={'minipack': 'classes'}, ext_modules=[module1], )