diff --git a/ceph/ceph-manager/centos/ceph-manager.spec b/ceph/ceph-manager/centos/ceph-manager.spec index 2f54deb5..06885582 100644 --- a/ceph/ceph-manager/centos/ceph-manager.spec +++ b/ceph/ceph-manager/centos/ceph-manager.spec @@ -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/* diff --git a/ceph/python-cephclient/centos/python-cephclient.spec b/ceph/python-cephclient/centos/python-cephclient.spec index 9c1cd22b..d31c3f4b 100644 --- a/ceph/python-cephclient/centos/python-cephclient.spec +++ b/ceph/python-cephclient/centos/python-cephclient.spec @@ -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/* diff --git a/utilities/logmgmt/centos/logmgmt.spec b/utilities/logmgmt/centos/logmgmt.spec index 8f544c78..c52fcd10 100644 --- a/utilities/logmgmt/centos/logmgmt.spec +++ b/utilities/logmgmt/centos/logmgmt.spec @@ -10,6 +10,8 @@ Source0: %{name}-%{version}.tar.gz Source1: LICENSE BuildRequires: python-setuptools +BuildRequires: python2-pip +BuildRequires: python2-wheel BuildRequires: systemd-devel Requires: systemd Requires: python-daemon @@ -32,6 +34,7 @@ rm -rf *.egg-info %build %{__python} setup.py build +%py2_build_wheel %install %{__python} setup.py install --root=$RPM_BUILD_ROOT \ @@ -39,6 +42,8 @@ rm -rf *.egg-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/bin/logmgmt %{buildroot}%{local_bindir}/logmgmt @@ -71,3 +76,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/* diff --git a/utilities/platform-util/centos/platform-util.spec b/utilities/platform-util/centos/platform-util.spec index 946b33da..8b04c97c 100644 --- a/utilities/platform-util/centos/platform-util.spec +++ b/utilities/platform-util/centos/platform-util.spec @@ -10,6 +10,8 @@ BuildArch: noarch Source: %name-%version.tar.gz BuildRequires: python-setuptools +BuildRequires: python2-pip +BuildRequires: python2-wheel %description Platform utilities @@ -36,6 +38,7 @@ Platform utilities that packaged on controllers or one node system %build %{__python} setup.py build +%py2_build_wheel %install %{__python} setup.py install --root=$RPM_BUILD_ROOT \ @@ -43,6 +46,8 @@ Platform utilities that packaged on controllers or one node system --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/ %global _buildsubdir %{_builddir}/%{name}-%{version} install -d %{buildroot}%{local_bindir} @@ -96,3 +101,12 @@ systemctl enable opt-platform.service %files -n platform-util-controller %defattr(-,root,root,-) /etc/systemd/system/memcached.service + +%package wheels +Summary: %{name} wheels + +%description wheels +Contains python wheels for %{name} + +%files wheels +/wheels/*