papi: expose vpp_papi version to client
root@ae2a2e85c5d4:/vpp/src/vpp-api/python# python3
Python 3.6.9 (default, Oct  8 2020, 12:12:24)
[GCC 8.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import vpp_papi
>>> vpp_papi.__version__
'1.6.2'
Type: feature
@@ -9,3 +9,9 @@ from . macaddress import MACAddress, mac_pton, mac_ntop # noqa: F401
from .vpp_serializer import BaseTypes # noqa: F401
from .vpp_serializer import VPPEnumType, VPPType, VPPTypeAlias # noqa: F401
from .vpp_serializer import VPPMessage, VPPUnionType # noqa: F401
+
+import pkg_resources # part of setuptools
+try:
+ __version__ = pkg_resources.get_distribution("vpp_papi").version
+except (pkg_resources.DistributionNotFound):
+ """Can't find vpp_papi via setuptools"""
