aboutsummaryrefslogtreecommitdiffstats
path: root/src/vpp-api
diff options
context:
space:
mode:
Diffstat (limited to 'src/vpp-api')
-rw-r--r--src/vpp-api/python/vpp_papi/__init__.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/vpp-api/python/vpp_papi/__init__.py b/src/vpp-api/python/vpp_papi/__init__.py
index 609001e3751..b2b4fc78fc1 100644
--- a/src/vpp-api/python/vpp_papi/__init__.py
+++ b/src/vpp-api/python/vpp_papi/__init__.py
@@ -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"""