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:
- starlingx-dashboard

Change-Id: Ie231c1c17dd3967cd83dbd3911ac947f99591923
Story: 2003907
Task: 27526
Signed-off-by: Don Penney <don.penney@windriver.com>
This commit is contained in:
Don Penney 2018-10-22 16:46:11 -04:00
parent b273d3d59d
commit 1c57e8b717
2 changed files with 16 additions and 1 deletions

1
centos_wheels.inc Normal file
View File

@ -0,0 +1 @@
starlingx-dashboard-wheels

View File

@ -11,6 +11,8 @@ Source0: %{name}-%{version}.tar.gz
BuildRequires: python-setuptools
BuildRequires: python-pbr
BuildRequires: python2-pip
BuildRequires: python2-wheel
Requires: openstack-dashboard
BuildArch: noarch
@ -29,10 +31,13 @@ starlingx specific horizon plugins
%build
export PBR_VERSION=%{version}
%py2_build
%py2_build_wheel
%install
export PBR_VERSION=%{version}
%py2_install
mkdir -p $RPM_BUILD_ROOT/wheels
install -m 644 dist/*.whl $RPM_BUILD_ROOT/wheels/
install -d -m 755 %{buildroot}%{enabled_dir}
install -p -D -m 755 %{py_pkg_name}/enabled/* %{buildroot}%{enabled_dir}
@ -45,4 +50,13 @@ rm -rf $RPM_BUILD_ROOT
%{python2_sitelib}/%{py_pkg_name}-%{version}*.egg-info
%{enabled_dir}
%{enabled_dir}
%package wheels
Summary: %{name} wheels
%description wheels
Contains python wheels for %{name}
%files wheels
/wheels/*