From 5a68debd8173a487dbd67b3e574d962308c91bcc Mon Sep 17 00:00:00 2001 From: root Date: Tue, 13 Dec 2016 17:00:02 +0100 Subject: vpp-python-api deb packaging - use easy_install to install the python api Change-Id: I67963d5a6ec324b13c50f8f6c51ed3c715b4c145 Signed-off-by: Gabriel Ganne --- build-root/deb/debian/vpp-python-api.postinst | 5 +++++ build-root/deb/debian/vpp-python-api.prerm | 8 ++++++++ src/vpp-api/python/setup.py | 1 + 3 files changed, 14 insertions(+) create mode 100644 build-root/deb/debian/vpp-python-api.postinst create mode 100644 build-root/deb/debian/vpp-python-api.prerm 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 00000000000..ca1c856f9cc --- /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 00000000000..e6d92df9b13 --- /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 99a0147a56f..8a34d501e77 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, ) -- cgit 1.2.3-korg