From 2e8760628d6f629ddaa0f24bb901e10dcdbd5435 Mon Sep 17 00:00:00 2001 From: Paul Vinciguerra Date: Tue, 12 May 2020 10:45:17 -0400 Subject: papi: remove dependency on aenum remove the dependency on the aenum package which was used to provide Enum.IntFlag which is now available in the python stdlib. aenum is not provided as a .deb and causes issues in packaging. Type: fix Change-Id: Ie45ec2130a767345f0aad038451780a5ddc7e8db Signed-off-by: Paul Vinciguerra --- src/vpp-api/python/setup.py | 7 ------- src/vpp-api/python/vpp_papi/vpp_serializer.py | 13 ++----------- 2 files changed, 2 insertions(+), 18 deletions(-) (limited to 'src') diff --git a/src/vpp-api/python/setup.py b/src/vpp-api/python/setup.py index a14e4e4d113..05c26bb05e5 100644 --- a/src/vpp-api/python/setup.py +++ b/src/vpp-api/python/setup.py @@ -13,19 +13,12 @@ # limitations under the License. import sys -stdlib_enum = sys.version_info >= (3, 6) -stdlib_ipaddress = sys.version_info >= (3, 3) - try: from setuptools import setup, find_packages except ImportError: from distutils.core import setup, find_packages requirements = ['cffi >= 1.6'] -if not stdlib_enum: - requirements.append('aenum') -if not stdlib_ipaddress: - requirements.append('ipaddress') setup( name='vpp_papi', diff --git a/src/vpp-api/python/vpp_papi/vpp_serializer.py b/src/vpp-api/python/vpp_papi/vpp_serializer.py index 09294875305..a5680335536 100644 --- a/src/vpp-api/python/vpp_papi/vpp_serializer.py +++ b/src/vpp-api/python/vpp_papi/vpp_serializer.py @@ -13,23 +13,14 @@ # limitations under the License. # import collections +from enum import IntFlag import logging import socket import struct import sys -if sys.version_info <= (3, 4): - from aenum import IntEnum # noqa: F401 -else: - from enum import IntEnum # noqa: F401 - -if sys.version_info <= (3, 6): - from aenum import IntFlag # noqa: F401 -else: - - from enum import IntFlag # noqa: F401 +from . import vpp_format -from . import vpp_format # noqa: E402 # # Set log-level in application by doing e.g.: -- cgit 1.2.3-korg