From 1c57e8b717852e421523b2cd9438846ad40f563d Mon Sep 17 00:00:00 2001 From: Don Penney Date: Mon, 22 Oct 2018 16:46:11 -0400 Subject: [PATCH] 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 --- centos_wheels.inc | 1 + .../centos/starlingx-dashboard.spec | 16 +++++++++++++++- 2 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 centos_wheels.inc diff --git a/centos_wheels.inc b/centos_wheels.inc new file mode 100644 index 00000000..a81753f7 --- /dev/null +++ b/centos_wheels.inc @@ -0,0 +1 @@ +starlingx-dashboard-wheels diff --git a/starlingx-dashboard/centos/starlingx-dashboard.spec b/starlingx-dashboard/centos/starlingx-dashboard.spec index 5ccdc762..7e8edd4c 100644 --- a/starlingx-dashboard/centos/starlingx-dashboard.spec +++ b/starlingx-dashboard/centos/starlingx-dashboard.spec @@ -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} \ No newline at end of file +%{enabled_dir} + +%package wheels +Summary: %{name} wheels + +%description wheels +Contains python wheels for %{name} + +%files wheels +/wheels/*