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:
- ceph-manager
- libvirt-python
- logmgmt
- platform-util
- python-3parclient
- python-cephclient
- python-lefthandclient
- python-ryu
- vm-topology

Change-Id: Ia63291e686818d19d0df52ff26b5f0bb3812b8ce
Story: 2003907
Task: 26787
Signed-off-by: Don Penney <don.penney@windriver.com>
This commit is contained in:
Don Penney
2018-10-22 16:48:38 -04:00
parent 0b0e18a720
commit a89aee499a
13 changed files with 218 additions and 2 deletions

View File

@@ -9,6 +9,8 @@ URL: unknown
Source0: %{name}-%{version}.tar.gz
BuildRequires: python-setuptools
BuildRequires: python2-pip
BuildRequires: python2-wheel
BuildRequires: systemd-units
BuildRequires: systemd-devel
Requires: sysinv
@@ -31,6 +33,7 @@ Handle sysinv RPC calls for long running Ceph API operations:
%build
%{__python} setup.py build
%py2_build_wheel
%install
%{__python} setup.py install --root=$RPM_BUILD_ROOT \
@@ -38,6 +41,8 @@ Handle sysinv RPC calls for long running Ceph API operations:
--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_etc_initd}
install -p -D -m 700 scripts/init.d/ceph-manager %{buildroot}%{local_etc_initd}/ceph-manager
@@ -68,3 +73,12 @@ rm -rf $RPM_BUILD_ROOT
%{pythonroot}/ceph_manager/*
%dir %{pythonroot}/ceph_manager-%{version}.0-py2.7.egg-info
%{pythonroot}/ceph_manager-%{version}.0-py2.7.egg-info/*
%package wheels
Summary: %{name} wheels
%description wheels
Contains python wheels for %{name}
%files wheels
/wheels/*

View File

@@ -25,6 +25,8 @@ BuildArch: noarch
BuildRequires: python
BuildRequires: ceph
BuildRequires: python2-pip
BuildRequires: python2-wheel
Requires: python
@@ -44,9 +46,12 @@ rm -f requirements.txt
%build
%{__python2} setup.py build
%py2_build_wheel
%install
%{__python2} setup.py install --skip-build --root %{buildroot}
mkdir -p $RPM_BUILD_ROOT/wheels
install -m 644 dist/*.whl $RPM_BUILD_ROOT/wheels/
%files
%doc README.rst
@@ -54,3 +59,11 @@ rm -f requirements.txt
%{python2_sitelib}/cephclient
%{python2_sitelib}/*.egg-info
%package wheels
Summary: %{name} wheels
%description wheels
Contains python wheels for %{name}
%files wheels
/wheels/*