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: - sm-api - sm-client - sm-tools Change-Id: If6ebbdaaad5ee7623cbbaa07b48d216461a16dec Story: 2003907 Task: 27527 Signed-off-by: Don Penney <don.penney@windriver.com>
This commit is contained in:
parent
c3050c7fc1
commit
b4049622ec
3
centos_wheels.inc
Normal file
3
centos_wheels.inc
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
sm-api-wheels
|
||||||
|
sm-client-wheels
|
||||||
|
sm-tools-wheels
|
@ -12,6 +12,8 @@ Source0: %{name}-%{version}.tar.gz
|
|||||||
|
|
||||||
BuildRequires: python
|
BuildRequires: python
|
||||||
BuildRequires: python-setuptools
|
BuildRequires: python-setuptools
|
||||||
|
BuildRequires: python2-pip
|
||||||
|
BuildRequires: python2-wheel
|
||||||
BuildRequires: util-linux
|
BuildRequires: util-linux
|
||||||
# BuildRequires systemd is to get %_unitdir I think
|
# BuildRequires systemd is to get %_unitdir I think
|
||||||
BuildRequires: systemd
|
BuildRequires: systemd
|
||||||
@ -29,10 +31,13 @@ Requires: mtce-pmon
|
|||||||
|
|
||||||
%build
|
%build
|
||||||
%{__python2} setup.py build
|
%{__python2} setup.py build
|
||||||
|
%py2_build_wheel
|
||||||
|
|
||||||
%install
|
%install
|
||||||
%global _buildsubdir %{_builddir}/%{name}-%{version}
|
%global _buildsubdir %{_builddir}/%{name}-%{version}
|
||||||
%{__python2} setup.py install -O1 --skip-build --root %{buildroot}
|
%{__python2} setup.py install -O1 --skip-build --root %{buildroot}
|
||||||
|
mkdir -p $RPM_BUILD_ROOT/wheels
|
||||||
|
install -m 644 dist/*.whl $RPM_BUILD_ROOT/wheels/
|
||||||
install -d %{buildroot}/etc/sm
|
install -d %{buildroot}/etc/sm
|
||||||
install -d %{buildroot}/etc/init.d
|
install -d %{buildroot}/etc/init.d
|
||||||
install -d %{buildroot}/etc/pmon.d
|
install -d %{buildroot}/etc/pmon.d
|
||||||
@ -82,3 +87,11 @@ Service Management API
|
|||||||
#%defattr(-,-,-,-)
|
#%defattr(-,-,-,-)
|
||||||
#"/usr/src/sm-api-1.0.tar.bz2"
|
#"/usr/src/sm-api-1.0.tar.bz2"
|
||||||
|
|
||||||
|
%package wheels
|
||||||
|
Summary: %{name} wheels
|
||||||
|
|
||||||
|
%description wheels
|
||||||
|
Contains python wheels for %{name}
|
||||||
|
|
||||||
|
%files wheels
|
||||||
|
/wheels/*
|
||||||
|
@ -12,6 +12,8 @@ Source0: %{name}-%{version}.tar.gz
|
|||||||
|
|
||||||
BuildRequires: python
|
BuildRequires: python
|
||||||
BuildRequires: python-setuptools
|
BuildRequires: python-setuptools
|
||||||
|
BuildRequires: python2-pip
|
||||||
|
BuildRequires: python2-wheel
|
||||||
Requires: python-libs
|
Requires: python-libs
|
||||||
Requires: python-six
|
Requires: python-six
|
||||||
%prep
|
%prep
|
||||||
@ -19,10 +21,13 @@ Requires: python-six
|
|||||||
|
|
||||||
%build
|
%build
|
||||||
%{__python2} setup.py build
|
%{__python2} setup.py build
|
||||||
|
%py2_build_wheel
|
||||||
|
|
||||||
%install
|
%install
|
||||||
%global _buildsubdir %{_builddir}/%{name}-%{version}
|
%global _buildsubdir %{_builddir}/%{name}-%{version}
|
||||||
%{__python2} setup.py install -O1 --skip-build --root %{buildroot}
|
%{__python2} setup.py install -O1 --skip-build --root %{buildroot}
|
||||||
|
mkdir -p $RPM_BUILD_ROOT/wheels
|
||||||
|
install -m 644 dist/*.whl $RPM_BUILD_ROOT/wheels/
|
||||||
install -d %{buildroot}/usr/bin
|
install -d %{buildroot}/usr/bin
|
||||||
install -m 755 %{_buildsubdir}/usr/bin/smc %{buildroot}/usr/bin
|
install -m 755 %{_buildsubdir}/usr/bin/smc %{buildroot}/usr/bin
|
||||||
|
|
||||||
@ -56,3 +61,11 @@ Service Management Client and CLI
|
|||||||
#%defattr(-,-,-,-)
|
#%defattr(-,-,-,-)
|
||||||
#"/usr/src/sm-client-1.0.tar.bz2"
|
#"/usr/src/sm-client-1.0.tar.bz2"
|
||||||
|
|
||||||
|
%package wheels
|
||||||
|
Summary: %{name} wheels
|
||||||
|
|
||||||
|
%description wheels
|
||||||
|
Contains python wheels for %{name}
|
||||||
|
|
||||||
|
%files wheels
|
||||||
|
/wheels/*
|
||||||
|
@ -12,6 +12,8 @@ Source0: %{name}-%{version}.tar.gz
|
|||||||
|
|
||||||
BuildRequires: python
|
BuildRequires: python
|
||||||
BuildRequires: python-setuptools
|
BuildRequires: python-setuptools
|
||||||
|
BuildRequires: python2-pip
|
||||||
|
BuildRequires: python2-wheel
|
||||||
Requires: python-libs
|
Requires: python-libs
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
@ -19,10 +21,13 @@ Requires: python-libs
|
|||||||
|
|
||||||
%build
|
%build
|
||||||
%{__python2} setup.py build
|
%{__python2} setup.py build
|
||||||
|
%py2_build_wheel
|
||||||
|
|
||||||
%install
|
%install
|
||||||
%global _buildsubdir %{_builddir}/%{name}-%{version}
|
%global _buildsubdir %{_builddir}/%{name}-%{version}
|
||||||
%{__python2} setup.py install -O1 --skip-build --root %{buildroot}
|
%{__python2} setup.py install -O1 --skip-build --root %{buildroot}
|
||||||
|
mkdir -p $RPM_BUILD_ROOT/wheels
|
||||||
|
install -m 644 dist/*.whl $RPM_BUILD_ROOT/wheels/
|
||||||
|
|
||||||
%description
|
%description
|
||||||
Service Management Tools
|
Service Management Tools
|
||||||
@ -54,3 +59,11 @@ Service Management Tools
|
|||||||
#%defattr(-,-,-,-)
|
#%defattr(-,-,-,-)
|
||||||
#"/usr/src/sm-tools-1.0.tar.bz2"
|
#"/usr/src/sm-tools-1.0.tar.bz2"
|
||||||
|
|
||||||
|
%package wheels
|
||||||
|
Summary: %{name} wheels
|
||||||
|
|
||||||
|
%description wheels
|
||||||
|
Contains python wheels for %{name}
|
||||||
|
|
||||||
|
%files wheels
|
||||||
|
/wheels/*
|
||||||
|
Loading…
Reference in New Issue
Block a user