diff --git a/centos_wheels.inc b/centos_wheels.inc new file mode 100644 index 00000000..fc50ccb7 --- /dev/null +++ b/centos_wheels.inc @@ -0,0 +1,3 @@ +sm-api-wheels +sm-client-wheels +sm-tools-wheels diff --git a/service-mgmt-api/centos/sm-api.spec b/service-mgmt-api/centos/sm-api.spec index ddea7dfd..ebab3bb4 100644 --- a/service-mgmt-api/centos/sm-api.spec +++ b/service-mgmt-api/centos/sm-api.spec @@ -12,6 +12,8 @@ Source0: %{name}-%{version}.tar.gz BuildRequires: python BuildRequires: python-setuptools +BuildRequires: python2-pip +BuildRequires: python2-wheel BuildRequires: util-linux # BuildRequires systemd is to get %_unitdir I think BuildRequires: systemd @@ -29,10 +31,13 @@ Requires: mtce-pmon %build %{__python2} setup.py build +%py2_build_wheel %install %global _buildsubdir %{_builddir}/%{name}-%{version} %{__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/init.d install -d %{buildroot}/etc/pmon.d @@ -82,3 +87,11 @@ Service Management API #%defattr(-,-,-,-) #"/usr/src/sm-api-1.0.tar.bz2" +%package wheels +Summary: %{name} wheels + +%description wheels +Contains python wheels for %{name} + +%files wheels +/wheels/* diff --git a/service-mgmt-client/centos/sm-client.spec b/service-mgmt-client/centos/sm-client.spec index 6d98098b..f922d626 100644 --- a/service-mgmt-client/centos/sm-client.spec +++ b/service-mgmt-client/centos/sm-client.spec @@ -12,6 +12,8 @@ Source0: %{name}-%{version}.tar.gz BuildRequires: python BuildRequires: python-setuptools +BuildRequires: python2-pip +BuildRequires: python2-wheel Requires: python-libs Requires: python-six %prep @@ -19,10 +21,13 @@ Requires: python-six %build %{__python2} setup.py build +%py2_build_wheel %install %global _buildsubdir %{_builddir}/%{name}-%{version} %{__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 -m 755 %{_buildsubdir}/usr/bin/smc %{buildroot}/usr/bin @@ -56,3 +61,11 @@ Service Management Client and CLI #%defattr(-,-,-,-) #"/usr/src/sm-client-1.0.tar.bz2" +%package wheels +Summary: %{name} wheels + +%description wheels +Contains python wheels for %{name} + +%files wheels +/wheels/* diff --git a/service-mgmt-tools/centos/sm-tools.spec b/service-mgmt-tools/centos/sm-tools.spec index 8a53cd35..26cc7d8d 100644 --- a/service-mgmt-tools/centos/sm-tools.spec +++ b/service-mgmt-tools/centos/sm-tools.spec @@ -12,6 +12,8 @@ Source0: %{name}-%{version}.tar.gz BuildRequires: python BuildRequires: python-setuptools +BuildRequires: python2-pip +BuildRequires: python2-wheel Requires: python-libs %prep @@ -19,10 +21,13 @@ Requires: python-libs %build %{__python2} setup.py build +%py2_build_wheel %install %global _buildsubdir %{_builddir}/%{name}-%{version} %{__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 Service Management Tools @@ -54,3 +59,11 @@ Service Management Tools #%defattr(-,-,-,-) #"/usr/src/sm-tools-1.0.tar.bz2" +%package wheels +Summary: %{name} wheels + +%description wheels +Contains python wheels for %{name} + +%files wheels +/wheels/*