summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--build-root/deb/debian/vpp-python-api.postinst5
-rw-r--r--build-root/deb/debian/vpp-python-api.prerm8
-rw-r--r--src/vpp-api/python/setup.py1
3 files changed, 14 insertions, 0 deletions
diff --git a/build-root/deb/debian/vpp-python-api.postinst b/build-root/deb/debian/vpp-python-api.postinst
new file mode 100644
index 00000000..ca1c856f
--- /dev/null
+++ b/build-root/deb/debian/vpp-python-api.postinst
@@ -0,0 +1,5 @@
+#!/bin/sh -e
+
+# after installing python-api files
+python2_sitedir=$(python -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")
+easy_install --install-dir=$python2_sitedir -z $python2_sitedir/vpp_papi/vpp_papi-*.egg
diff --git a/build-root/deb/debian/vpp-python-api.prerm b/build-root/deb/debian/vpp-python-api.prerm
new file mode 100644
index 00000000..e6d92df9
--- /dev/null
+++ b/build-root/deb/debian/vpp-python-api.prerm
@@ -0,0 +1,8 @@
+#!/bin/sh -e
+
+# before removing python-api files
+python2_sitedir=$(python -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")
+easy_install --install-dir=$python2_sitedir -mxNq vpp_papi
+
+# the egg has been copied during install
+rm $python2_sitedir/vpp_papi-*.egg
diff --git a/src/vpp-api/python/setup.py b/src/vpp-api/python/setup.py
index 99a0147a..8a34d501 100644
--- a/src/vpp-api/python/setup.py
+++ b/src/vpp-api/python/setup.py
@@ -31,4 +31,5 @@ setup (name = 'vpp_papi',
libraries = ['pneum'],
)],
long_description = '''VPP Python language binding.''',
+ zip_safe = True,
)