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:
- cgcs-patch
- patch-alarm
- requests-toolbelt
- tsconfig

Depends-On: Ie2ced7bba00d11b1698422cbe495abc0fbab7637
Change-Id: Ibdae0a338a1af493ac522757b61bbd6df1da941e
Story: 2003907
Task: 27529
Signed-off-by: Don Penney <don.penney@windriver.com>
This commit is contained in:
Don Penney 2018-10-22 16:51:58 -04:00 committed by Scott Little
parent d12717e718
commit 100631e4b2
1 changed files with 14 additions and 0 deletions

View File

@ -11,6 +11,8 @@ Source0: %{name}-%{version}.tar.gz
%define debug_package %{nil}
BuildRequires: python-setuptools
BuildRequires: python2-pip
BuildRequires: python2-wheel
%description
Titanium Cloud Config Info
@ -24,6 +26,7 @@ Titanium Cloud Config Info
%build
%{__python} setup.py build
%py2_build_wheel
%install
%{__python} setup.py install --root=$RPM_BUILD_ROOT \
@ -31,6 +34,8 @@ Titanium Cloud Config Info
--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/
install -d -m 755 %{buildroot}%{local_bindir}
install -p -D -m 700 scripts/tsconfig %{buildroot}%{local_bindir}/tsconfig
@ -46,3 +51,12 @@ rm -rf $RPM_BUILD_ROOT
%{pythonroot}/%{name}/*
%dir %{pythonroot}/%{name}-%{version}.0-py2.7.egg-info
%{pythonroot}/%{name}-%{version}.0-py2.7.egg-info/*
%package wheels
Summary: %{name} wheels
%description wheels
Contains python wheels for %{name}
%files wheels
/wheels/*