From 32905661d1d16198d74ec4596fe95659ebf81b67 Mon Sep 17 00:00:00 2001 From: Gabriel Ganne Date: Tue, 6 Dec 2016 19:12:49 +0100 Subject: vpp-python-api packaging - use easy_install to install the python api adds python-setuptools as dependency Change-Id: I186f5d4353ee7667377fb6b0486d16a1571bdf09 Signed-off-by: Gabriel Ganne --- build-root/rpm/vpp.spec | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) (limited to 'build-root') diff --git a/build-root/rpm/vpp.spec b/build-root/rpm/vpp.spec index 5db0c4bd7c1..dd4817ee920 100644 --- a/build-root/rpm/vpp.spec +++ b/build-root/rpm/vpp.spec @@ -74,7 +74,7 @@ This package contains VPP plugins %package python-api Summary: VPP api python bindings Group: Development/Libraries -Requires: vpp = %{_version}-%{_release}, vpp-lib = %{_version}-%{_release} +Requires: vpp = %{_version}-%{_release}, vpp-lib = %{_version}-%{_release}, python-setuptools %description python-api This package contains the python bindings for the vpp api @@ -134,11 +134,8 @@ do done # Python bindings -mkdir -p -m755 %{buildroot}%{python2_sitelib}/vpp_papi -for file in $(find %{_mu_build_dir}/%{_vpp_install_dir}/*/lib/python2.7/site-packages/ -type f -print | grep -v pyc | grep -v pyo) -do - install -p -m 666 $file %{buildroot}%{python2_sitelib}/vpp_papi/ -done +mkdir -p -m755 %{buildroot}%{python2_sitelib} +install -p -m 666 %{_mu_build_dir}/%{_vpp_install_dir}/*/lib/python2.7/site-packages/vpp_papi-*.egg %{buildroot}%{python2_sitelib} # # devel @@ -196,9 +193,15 @@ done sysctl --system %systemd_post vpp.service +%post python-api +easy_install -z %{python2_sitelib}/vpp_papi-*.egg + %preun %systemd_preun vpp.service +%preun python-api +easy_install -mxNq vpp_papi + %postun %systemd_postun @@ -239,7 +242,7 @@ fi %files python-api %defattr(644,root,root) -%{python2_sitelib}/vpp_papi/* +%{python2_sitelib}/vpp_papi-*.egg %files devel %defattr(-,bin,bin) -- cgit 1.2.3-korg