summaryrefslogtreecommitdiffstats
path: root/build-root/rpm/vpp.spec
diff options
context:
space:
mode:
Diffstat (limited to 'build-root/rpm/vpp.spec')
-rw-r--r--build-root/rpm/vpp.spec17
1 files changed, 10 insertions, 7 deletions
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)