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 Change-Id: Ibdae0a338a1af493ac522757b61bbd6df1da941e Story: 2003907 Task: 27529 Signed-off-by: Don Penney <don.penney@windriver.com>
This commit is contained in:
parent
bb89685107
commit
0b5dcff8c6
4
centos_wheels.inc
Normal file
4
centos_wheels.inc
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
cgcs-patch-wheels
|
||||||
|
patch-alarm-wheels
|
||||||
|
requests-toolbelt-wheels
|
||||||
|
tsconfig-wheels
|
@ -10,6 +10,8 @@ Source0: %{name}-%{version}.tar.gz
|
|||||||
Source1: LICENSE
|
Source1: LICENSE
|
||||||
|
|
||||||
BuildRequires: python-setuptools
|
BuildRequires: python-setuptools
|
||||||
|
BuildRequires: python2-pip
|
||||||
|
BuildRequires: python2-wheel
|
||||||
BuildRequires: systemd-units
|
BuildRequires: systemd-units
|
||||||
BuildRequires: systemd-devel
|
BuildRequires: systemd-devel
|
||||||
Requires: python-devel
|
Requires: python-devel
|
||||||
@ -27,6 +29,7 @@ TIS Platform Patching
|
|||||||
|
|
||||||
%build
|
%build
|
||||||
%{__python} setup.py build
|
%{__python} setup.py build
|
||||||
|
%py2_build_wheel
|
||||||
|
|
||||||
%install
|
%install
|
||||||
%{__python} setup.py install --root=$RPM_BUILD_ROOT \
|
%{__python} setup.py install --root=$RPM_BUILD_ROOT \
|
||||||
@ -34,6 +37,8 @@ TIS Platform Patching
|
|||||||
--prefix=/usr \
|
--prefix=/usr \
|
||||||
--install-data=/usr/share \
|
--install-data=/usr/share \
|
||||||
--single-version-externally-managed
|
--single-version-externally-managed
|
||||||
|
mkdir -p $RPM_BUILD_ROOT/wheels
|
||||||
|
install -m 644 dist/*.whl $RPM_BUILD_ROOT/wheels/
|
||||||
|
|
||||||
install -m 755 -d %{buildroot}%{_sbindir}
|
install -m 755 -d %{buildroot}%{_sbindir}
|
||||||
install -m 755 -d %{buildroot}%{_sysconfdir}/bash_completion.d
|
install -m 755 -d %{buildroot}%{_sysconfdir}/bash_completion.d
|
||||||
@ -178,3 +183,11 @@ TIS Platform Patching
|
|||||||
%{_sysconfdir}/init.d/sw-patch-agent
|
%{_sysconfdir}/init.d/sw-patch-agent
|
||||||
%{_unitdir}/sw-patch-agent.service
|
%{_unitdir}/sw-patch-agent.service
|
||||||
|
|
||||||
|
%package wheels
|
||||||
|
Summary: %{name} wheels
|
||||||
|
|
||||||
|
%description wheels
|
||||||
|
Contains python wheels for %{name}
|
||||||
|
|
||||||
|
%files wheels
|
||||||
|
/wheels/*
|
||||||
|
@ -11,6 +11,8 @@ Source0: %{name}-%{version}.tar.gz
|
|||||||
%define debug_package %{nil}
|
%define debug_package %{nil}
|
||||||
|
|
||||||
BuildRequires: python-setuptools
|
BuildRequires: python-setuptools
|
||||||
|
BuildRequires: python2-pip
|
||||||
|
BuildRequires: python2-wheel
|
||||||
Requires: python-devel
|
Requires: python-devel
|
||||||
Requires: /bin/bash
|
Requires: /bin/bash
|
||||||
|
|
||||||
@ -24,6 +26,7 @@ TIS Platform Patching
|
|||||||
|
|
||||||
%build
|
%build
|
||||||
%{__python} setup.py build
|
%{__python} setup.py build
|
||||||
|
%py2_build_wheel
|
||||||
|
|
||||||
%install
|
%install
|
||||||
%{__python} setup.py install --root=$RPM_BUILD_ROOT \
|
%{__python} setup.py install --root=$RPM_BUILD_ROOT \
|
||||||
@ -31,6 +34,8 @@ TIS Platform Patching
|
|||||||
--prefix=/usr \
|
--prefix=/usr \
|
||||||
--install-data=/usr/share \
|
--install-data=/usr/share \
|
||||||
--single-version-externally-managed
|
--single-version-externally-managed
|
||||||
|
mkdir -p $RPM_BUILD_ROOT/wheels
|
||||||
|
install -m 644 dist/*.whl $RPM_BUILD_ROOT/wheels/
|
||||||
|
|
||||||
install -m 755 -d %{buildroot}%{_bindir}
|
install -m 755 -d %{buildroot}%{_bindir}
|
||||||
install -m 755 -d %{buildroot}%{_sysconfdir}/init.d
|
install -m 755 -d %{buildroot}%{_sysconfdir}/init.d
|
||||||
@ -53,3 +58,11 @@ rm -rf $RPM_BUILD_ROOT
|
|||||||
"%{_bindir}/patch-alarm-manager"
|
"%{_bindir}/patch-alarm-manager"
|
||||||
"%{_sysconfdir}/init.d/patch-alarm-manager"
|
"%{_sysconfdir}/init.d/patch-alarm-manager"
|
||||||
|
|
||||||
|
%package wheels
|
||||||
|
Summary: %{name} wheels
|
||||||
|
|
||||||
|
%description wheels
|
||||||
|
Contains python wheels for %{name}
|
||||||
|
|
||||||
|
%files wheels
|
||||||
|
/wheels/*
|
||||||
|
@ -11,6 +11,8 @@ Source0: %{name}-%{version}.tar.gz
|
|||||||
%define debug_package %{nil}
|
%define debug_package %{nil}
|
||||||
|
|
||||||
BuildRequires: python-setuptools
|
BuildRequires: python-setuptools
|
||||||
|
BuildRequires: python2-pip
|
||||||
|
BuildRequires: python2-wheel
|
||||||
Requires: python-devel
|
Requires: python-devel
|
||||||
Requires: /bin/bash
|
Requires: /bin/bash
|
||||||
|
|
||||||
@ -24,6 +26,7 @@ A utility belt for advanced users of python-requests
|
|||||||
|
|
||||||
%build
|
%build
|
||||||
%{__python} setup.py build
|
%{__python} setup.py build
|
||||||
|
%py2_build_wheel
|
||||||
|
|
||||||
%install
|
%install
|
||||||
%{__python} setup.py install --root=$RPM_BUILD_ROOT \
|
%{__python} setup.py install --root=$RPM_BUILD_ROOT \
|
||||||
@ -31,6 +34,8 @@ A utility belt for advanced users of python-requests
|
|||||||
--prefix=/usr \
|
--prefix=/usr \
|
||||||
--install-data=/usr/share \
|
--install-data=/usr/share \
|
||||||
--single-version-externally-managed
|
--single-version-externally-managed
|
||||||
|
mkdir -p $RPM_BUILD_ROOT/wheels
|
||||||
|
install -m 644 dist/*.whl $RPM_BUILD_ROOT/wheels/
|
||||||
|
|
||||||
%clean
|
%clean
|
||||||
rm -rf $RPM_BUILD_ROOT
|
rm -rf $RPM_BUILD_ROOT
|
||||||
@ -41,3 +46,11 @@ rm -rf $RPM_BUILD_ROOT
|
|||||||
%{pythonroot}/requests_toolbelt
|
%{pythonroot}/requests_toolbelt
|
||||||
%{pythonroot}/requests_toolbelt-*.egg-info
|
%{pythonroot}/requests_toolbelt-*.egg-info
|
||||||
|
|
||||||
|
%package wheels
|
||||||
|
Summary: %{name} wheels
|
||||||
|
|
||||||
|
%description wheels
|
||||||
|
Contains python wheels for %{name}
|
||||||
|
|
||||||
|
%files wheels
|
||||||
|
/wheels/*
|
||||||
|
@ -11,6 +11,8 @@ Source0: %{name}-%{version}.tar.gz
|
|||||||
%define debug_package %{nil}
|
%define debug_package %{nil}
|
||||||
|
|
||||||
BuildRequires: python-setuptools
|
BuildRequires: python-setuptools
|
||||||
|
BuildRequires: python2-pip
|
||||||
|
BuildRequires: python2-wheel
|
||||||
|
|
||||||
%description
|
%description
|
||||||
Titanium Cloud Config Info
|
Titanium Cloud Config Info
|
||||||
@ -24,6 +26,7 @@ Titanium Cloud Config Info
|
|||||||
|
|
||||||
%build
|
%build
|
||||||
%{__python} setup.py build
|
%{__python} setup.py build
|
||||||
|
%py2_build_wheel
|
||||||
|
|
||||||
%install
|
%install
|
||||||
%{__python} setup.py install --root=$RPM_BUILD_ROOT \
|
%{__python} setup.py install --root=$RPM_BUILD_ROOT \
|
||||||
@ -31,6 +34,8 @@ Titanium Cloud Config Info
|
|||||||
--prefix=/usr \
|
--prefix=/usr \
|
||||||
--install-data=/usr/share \
|
--install-data=/usr/share \
|
||||||
--single-version-externally-managed
|
--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 -d -m 755 %{buildroot}%{local_bindir}
|
||||||
install -p -D -m 700 scripts/tsconfig %{buildroot}%{local_bindir}/tsconfig
|
install -p -D -m 700 scripts/tsconfig %{buildroot}%{local_bindir}/tsconfig
|
||||||
@ -46,3 +51,12 @@ rm -rf $RPM_BUILD_ROOT
|
|||||||
%{pythonroot}/%{name}/*
|
%{pythonroot}/%{name}/*
|
||||||
%dir %{pythonroot}/%{name}-%{version}.0-py2.7.egg-info
|
%dir %{pythonroot}/%{name}-%{version}.0-py2.7.egg-info
|
||||||
%{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/*
|
||||||
|
Loading…
x
Reference in New Issue
Block a user