Add hooks for python wheel generation
This update adds hooks to the spec files for the following packages to generate wheels for the python modules: - nfv - nova-api-proxy Change-Id: Ibda4e57c840b8aa5da5d33a92c1146759a3f9a77 Story: 2003907 Task: 27528 Signed-off-by: Don Penney <don.penney@windriver.com>
This commit is contained in:
parent
cdcdd5ebb3
commit
9b1b141207
2
centos_wheels.inc
Normal file
2
centos_wheels.inc
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
nfv-wheels
|
||||||
|
nova-api-proxy-wheels
|
@ -11,6 +11,8 @@ Source0: %{name}-%{version}.tar.gz
|
|||||||
%define debug_package %{nil}
|
%define debug_package %{nil}
|
||||||
|
|
||||||
BuildRequires: python-setuptools
|
BuildRequires: python-setuptools
|
||||||
|
BuildRequires: python2-pip
|
||||||
|
BuildRequires: python2-wheel
|
||||||
|
|
||||||
%description
|
%description
|
||||||
Titanium Cloud Config Info
|
Titanium Cloud Config Info
|
||||||
@ -21,6 +23,7 @@ Titanium Cloud Config Info
|
|||||||
%define build_python() ( \
|
%define build_python() ( \
|
||||||
pushd %1; \
|
pushd %1; \
|
||||||
%{__python} setup.py build; \
|
%{__python} setup.py build; \
|
||||||
|
%{__python} setup.py bdist_wheel; \
|
||||||
popd)
|
popd)
|
||||||
|
|
||||||
%define install_python() ( \
|
%define install_python() ( \
|
||||||
@ -31,6 +34,8 @@ Titanium Cloud Config Info
|
|||||||
--prefix=/usr \\\
|
--prefix=/usr \\\
|
||||||
--install-data=/usr/share \\\
|
--install-data=/usr/share \\\
|
||||||
--single-version-externally-managed; \
|
--single-version-externally-managed; \
|
||||||
|
mkdir -p $RPM_BUILD_ROOT/wheels; \
|
||||||
|
install -m 644 dist/*.whl $RPM_BUILD_ROOT/wheels/; \
|
||||||
popd)
|
popd)
|
||||||
|
|
||||||
# TODO: nfv-docs
|
# TODO: nfv-docs
|
||||||
@ -185,3 +190,12 @@ rm -rf $RPM_BUILD_ROOT
|
|||||||
%{pythonroot}/nfv_client/*
|
%{pythonroot}/nfv_client/*
|
||||||
%dir %{pythonroot}/nfv_client-%{version}.0-py2.7.egg-info
|
%dir %{pythonroot}/nfv_client-%{version}.0-py2.7.egg-info
|
||||||
%{pythonroot}/nfv_client-%{version}.0-py2.7.egg-info/*
|
%{pythonroot}/nfv_client-%{version}.0-py2.7.egg-info/*
|
||||||
|
|
||||||
|
%package wheels
|
||||||
|
Summary: NFV wheels
|
||||||
|
|
||||||
|
%description wheels
|
||||||
|
Contains python wheels for NFV
|
||||||
|
|
||||||
|
%files wheels
|
||||||
|
/wheels/*
|
||||||
|
@ -11,6 +11,8 @@ Source0: %{name}-%{version}.tar.gz
|
|||||||
%define debug_package %{nil}
|
%define debug_package %{nil}
|
||||||
|
|
||||||
BuildRequires: python-setuptools
|
BuildRequires: python-setuptools
|
||||||
|
BuildRequires: python2-pip
|
||||||
|
BuildRequires: python2-wheel
|
||||||
Requires: python-eventlet
|
Requires: python-eventlet
|
||||||
Requires: python-routes
|
Requires: python-routes
|
||||||
Requires: python-webob
|
Requires: python-webob
|
||||||
@ -31,6 +33,7 @@ Nova Computer API Proxy
|
|||||||
|
|
||||||
%build
|
%build
|
||||||
%{__python} setup.py build
|
%{__python} setup.py build
|
||||||
|
%py2_build_wheel
|
||||||
|
|
||||||
%install
|
%install
|
||||||
%{__python} setup.py install --root=$RPM_BUILD_ROOT \
|
%{__python} setup.py install --root=$RPM_BUILD_ROOT \
|
||||||
@ -38,6 +41,8 @@ Nova Computer API Proxy
|
|||||||
--prefix=/usr \
|
--prefix=/usr \
|
||||||
--install-data=/usr/share \
|
--install-data=/usr/share \
|
||||||
--single-version-externally-managed
|
--single-version-externally-managed
|
||||||
|
mkdir -p $RPM_BUILD_ROOT/wheels
|
||||||
|
install -m 644 dist/*.whl $RPM_BUILD_ROOT/wheels/
|
||||||
|
|
||||||
install -d -m 755 %{buildroot}%{local_etc_systemd}
|
install -d -m 755 %{buildroot}%{local_etc_systemd}
|
||||||
install -p -D -m 644 nova_api_proxy/scripts/api-proxy.service %{buildroot}%{local_etc_systemd}/api-proxy.service
|
install -p -D -m 644 nova_api_proxy/scripts/api-proxy.service %{buildroot}%{local_etc_systemd}/api-proxy.service
|
||||||
@ -64,3 +69,12 @@ rm -rf $RPM_BUILD_ROOT
|
|||||||
%dir %{pythonroot}/nova_api_proxy
|
%dir %{pythonroot}/nova_api_proxy
|
||||||
%{pythonroot}/nova_api_proxy/*
|
%{pythonroot}/nova_api_proxy/*
|
||||||
%{pythonroot}/api_proxy-%{version}.0-py2.7.egg-info/*
|
%{pythonroot}/api_proxy-%{version}.0-py2.7.egg-info/*
|
||||||
|
|
||||||
|
%package wheels
|
||||||
|
Summary: %{module_name} wheels
|
||||||
|
|
||||||
|
%description wheels
|
||||||
|
Contains python wheels for %{module_name}
|
||||||
|
|
||||||
|
%files wheels
|
||||||
|
/wheels/*
|
||||||
|
Loading…
x
Reference in New Issue
Block a user