[platform][barefoot] Drop python2 support (#7029)

No longer install Python 2 sonic_platform package for Broadcom platforms; only install Python 3 package.

Signed-off-by: Volodymyr Boyko <volodymyrx.boiko@intel.com>
This commit is contained in:
Volodymyr Boiko 2021-03-12 05:00:19 +02:00 committed by GitHub
parent 7caa70d2d6
commit 35dd885c18
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
12 changed files with 1 additions and 21 deletions

View File

@ -2,8 +2,6 @@
set -e
PLATFORM_NAME=x86_64-accton_wedge100bf_32x-r0
SONIC_PLATFORM_WHEEL_PY2="/usr/share/sonic/device/${PLATFORM_NAME}/sonic_platform-1.0-py2-none-any.whl"
python2 -m pip install ${SONIC_PLATFORM_WHEEL_PY2}
SONIC_PLATFORM_WHEEL_PY3="/usr/share/sonic/device/${PLATFORM_NAME}/sonic_platform-1.0-py3-none-any.whl"
python3 -m pip install ${SONIC_PLATFORM_WHEEL_PY3}

View File

@ -1,6 +1,5 @@
#!/bin/sh
python2 -m pip uninstall -y sonic-platform
python3 -m pip uninstall -y sonic-platform
#DEBHELPER#

View File

@ -12,7 +12,6 @@ WHEEL_BUILD_DIR := $(BUILD_DIR)/wheel
override_dh_auto_build:
set -e
python2.7 setup.py bdist_wheel -d $(WHEEL_BUILD_DIR)
python3 setup.py bdist_wheel -d $(WHEEL_BUILD_DIR)
set +e

View File

@ -42,11 +42,6 @@ _product_dict = { "Montara" : "Wedge100BF-32X-O-AC-F-BF",
_EEPROM_SYMLINK = "/var/run/platform/eeprom/syseeprom"
_EEPROM_STATUS = "/var/run/platform/eeprom/status"
try:
_str_type = basestring
except NameError:
_str_type = str
class Eeprom(eeprom_tlvinfo.TlvInfoDecoder):
def __init__(self):
with open(os.path.dirname(__file__) + "/logging.conf", 'r') as f:
@ -89,7 +84,7 @@ class Eeprom(eeprom_tlvinfo.TlvInfoDecoder):
if elem is None:
continue
if isinstance(val, _str_type):
if isinstance(val, str):
value = val.replace('\0', '')
else:
value = str(val)

View File

@ -18,7 +18,6 @@ MODULE_NAMES := as9516 as9516bf
override_dh_auto_build:
make -C $(KERNEL_SRC)/build M=$(MODULE_SRC)
set -e
python2.7 setup.py bdist_wheel -d $(WHEEL_BUILD_DIR)
python3 setup.py bdist_wheel -d $(WHEEL_BUILD_DIR)
set +e

View File

@ -5,8 +5,6 @@ systemctl enable bfn-newport.service
systemctl start bfn-newport.service
PLATFORM_NAME=x86_64-accton_as9516_32d-r0
SONIC_PLATFORM_WHEEL_PY2="/usr/share/sonic/device/${PLATFORM_NAME}/sonic_platform-1.0-py2-none-any.whl"
python2 -m pip install ${SONIC_PLATFORM_WHEEL_PY2}
SONIC_PLATFORM_WHEEL_PY3="/usr/share/sonic/device/${PLATFORM_NAME}/sonic_platform-1.0-py3-none-any.whl"
python3 -m pip install ${SONIC_PLATFORM_WHEEL_PY3}

View File

@ -1,6 +1,5 @@
#!/bin/sh
python2 -m pip uninstall -y sonic-platform
python3 -m pip uninstall -y sonic-platform
#DEBHELPER#

View File

@ -5,8 +5,6 @@ systemctl enable bfn-newport.service
systemctl start bfn-newport.service
PLATFORM_NAME=x86_64-accton_as9516bf_32d-r0
SONIC_PLATFORM_WHEEL_PY2="/usr/share/sonic/device/${PLATFORM_NAME}/sonic_platform-1.0-py2-none-any.whl"
python2 -m pip install ${SONIC_PLATFORM_WHEEL_PY2}
SONIC_PLATFORM_WHEEL_PY3="/usr/share/sonic/device/${PLATFORM_NAME}/sonic_platform-1.0-py3-none-any.whl"
python3 -m pip install ${SONIC_PLATFORM_WHEEL_PY3}

View File

@ -1,6 +1,5 @@
#!/bin/sh
python2 -m pip uninstall -y sonic-platform
python3 -m pip uninstall -y sonic-platform
#DEBHELPER#

View File

@ -2,8 +2,6 @@
set -e
PLATFORM_NAME=x86_64-accton_wedge100bf_65x-r0
SONIC_PLATFORM_WHEEL_PY2="/usr/share/sonic/device/${PLATFORM_NAME}/sonic_platform-1.0-py2-none-any.whl"
python2 -m pip install ${SONIC_PLATFORM_WHEEL_PY2}
SONIC_PLATFORM_WHEEL_PY3="/usr/share/sonic/device/${PLATFORM_NAME}/sonic_platform-1.0-py3-none-any.whl"
python3 -m pip install ${SONIC_PLATFORM_WHEEL_PY3}

View File

@ -1,6 +1,5 @@
#!/bin/sh
python2 -m pip uninstall -y sonic-platform
python3 -m pip uninstall -y sonic-platform
#DEBHELPER#

View File

@ -12,7 +12,6 @@ WHEEL_BUILD_DIR := $(BUILD_DIR)/wheel
override_dh_auto_build:
set -e
python2.7 setup.py bdist_wheel -d $(WHEEL_BUILD_DIR)
python3 setup.py bdist_wheel -d $(WHEEL_BUILD_DIR)
set +e