summaryrefslogtreecommitdiffstats
path: root/src/vpp-api/python/setup.py
diff options
context:
space:
mode:
authorOle Troan <otroan@employees.org>2024-01-23 18:56:23 +0100
committerAndrew Yourtchenko <ayourtch@gmail.com>2024-01-29 22:57:31 +0000
commitac0babd412e3b5282136a5c5c5be2c4cc4be6895 (patch)
tree5c58249463d7121a163534e55b1d5f6f27ae7967 /src/vpp-api/python/setup.py
parentf34b6800de78d99192dc5757a4845e2668749c40 (diff)
api: provide api definition over api
This patch allows a client to bootstrap itself by downloading the JSON API definitions over the API itself. This patch enables it for Python (probably need a dynamic language). Call VPPApiClient with the new bootstrapapi=True parameter. Example (Python): from vpp_papi import VPPApiClient vpp = VPPApiClient(bootstrapapi=True) rv = vpp.connect("foobar") assert rv == 0 print(f'SHOW VERSION: {vpp.api.show_version()}') vpp.disconnect() Type: feature Change-Id: Id903fdccc82b2e22aa1994331d2c150253f2ccae Signed-off-by: Ole Troan <otroan@employees.org>
Diffstat (limited to 'src/vpp-api/python/setup.py')
-rw-r--r--src/vpp-api/python/setup.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/vpp-api/python/setup.py b/src/vpp-api/python/setup.py
index 18637ba21b7..784013fc606 100644
--- a/src/vpp-api/python/setup.py
+++ b/src/vpp-api/python/setup.py
@@ -11,7 +11,6 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
-import sys
try:
from setuptools import setup, find_packages
@@ -22,7 +21,7 @@ requirements = []
setup(
name="vpp_papi",
- version="2.0.0",
+ version="2.1.0",
description="VPP Python binding",
author="Ole Troan",
author_email="ot@cisco.com",
@@ -31,6 +30,7 @@ setup(
test_suite="vpp_papi.tests",
install_requires=requirements,
packages=find_packages(),
+ package_data={"vpp_papi": ["data/*.json"]},
long_description="""VPP Python language binding.""",
zip_safe=True,
)