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:
- configutilities
- controllerconfig
- cgts-client
- sysinv

Change-Id: I340db4c6516c9bf8badbdd0ecdcf61670e168aea
Story: 2003907
Task: 27524
Signed-off-by: Don Penney <don.penney@windriver.com>
This commit is contained in:
Don Penney
2018-10-22 16:40:59 -04:00
parent 8a1afec67c
commit 4095ac7005
5 changed files with 60 additions and 0 deletions

View File

@@ -12,6 +12,8 @@ Source1: LICENSE
%define debug_package %{nil}
BuildRequires: python-setuptools
BuildRequires: python2-pip
BuildRequires: python2-wheel
Requires: python-netaddr
#Requires: wxPython
@@ -35,6 +37,7 @@ SDK files for configutilities
%build
%{__python} setup.py build
%py2_build_wheel
%install
%{__python} setup.py install --root=$RPM_BUILD_ROOT \
@@ -42,6 +45,8 @@ SDK files for configutilities
--prefix=/usr \
--install-data=/usr/share \
--single-version-externally-managed
mkdir -p $RPM_BUILD_ROOT/wheels
install -m 644 dist/*.whl $RPM_BUILD_ROOT/wheels/
sed -i "s#xxxSW_VERSIONxxx#%{platform_release}#" %{name}/common/validator.py
tar czf %{cgcs_sdk_tarball_name} %{name}
@@ -62,3 +67,12 @@ rm -rf $RPM_BUILD_ROOT
%files -n %{name}-cgts-sdk
%{cgcs_sdk_deploy_dir}/%{cgcs_sdk_tarball_name}
%package wheels
Summary: %{name} wheels
%description wheels
Contains python wheels for %{name}
%files wheels
/wheels/*