[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:
parent
7caa70d2d6
commit
35dd885c18
@ -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}
|
||||
|
||||
|
@ -1,6 +1,5 @@
|
||||
#!/bin/sh
|
||||
|
||||
python2 -m pip uninstall -y sonic-platform
|
||||
python3 -m pip uninstall -y sonic-platform
|
||||
|
||||
#DEBHELPER#
|
||||
|
@ -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
|
||||
|
||||
|
@ -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)
|
||||
|
@ -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
|
||||
|
||||
|
@ -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}
|
||||
|
||||
|
@ -1,6 +1,5 @@
|
||||
#!/bin/sh
|
||||
|
||||
python2 -m pip uninstall -y sonic-platform
|
||||
python3 -m pip uninstall -y sonic-platform
|
||||
|
||||
#DEBHELPER#
|
||||
|
@ -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}
|
||||
|
||||
|
@ -1,6 +1,5 @@
|
||||
#!/bin/sh
|
||||
|
||||
python2 -m pip uninstall -y sonic-platform
|
||||
python3 -m pip uninstall -y sonic-platform
|
||||
|
||||
#DEBHELPER#
|
||||
|
@ -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}
|
||||
|
||||
|
@ -1,6 +1,5 @@
|
||||
#!/bin/sh
|
||||
|
||||
python2 -m pip uninstall -y sonic-platform
|
||||
python3 -m pip uninstall -y sonic-platform
|
||||
|
||||
#DEBHELPER#
|
||||
|
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user