diff --git a/imagefactory.spec b/imagefactory.spec index d232423..fa1331c 100644 --- a/imagefactory.spec +++ b/imagefactory.spec @@ -42,8 +42,8 @@ Requires(preun): initscripts BuildRequires: python2 +BuildRequires: python2-devel BuildRequires: python2-setuptools -BuildRequires: python-unversioned-command # TODO: Any changes to the _internal_ API must increment this version or, in # the case of backwards compatible changes, add a new version (RPM # allows multiple version "=" lines for the same package or @@ -59,17 +59,17 @@ https://github.com/redhat-imaging/imagefactory for more information. %setup -q %build -python setup.py build +%py2_build %install -python setup.py install -O1 --root=%{buildroot} --skip-build +%py2_install %{__install} -d %{buildroot}/%{_sysconfdir}/imagefactory/jeos_images %{__install} -d %{buildroot}/%{_localstatedir}/lib/imagefactory/images %{__install} -d %{buildroot}/%{_sysconfdir}/imagefactory/plugins.d %{__install} -d %{buildroot}/%{_sysconfdir}/logrotate.d -sed -i '/\/usr\/bin\/env python/d' %{buildroot}/%{python_sitelib}/imgfac/*.py +sed -i '/\/usr\/bin\/env python/d' %{buildroot}/%{python2_sitelib}/imgfac/*.py %{__install} -m0600 conf/sysconfig/imagefactoryd %{buildroot}/%{_sysconfdir}/sysconfig/imagefactoryd %{__install} -m0600 conf/logrotate.d/imagefactoryd %{buildroot}/%{_sysconfdir}/logrotate.d/imagefactoryd @@ -122,7 +122,7 @@ fi %dir %attr(0755, root, root) %{_sysconfdir}/imagefactory/plugins.d/ %dir %attr(0755, root, root) %{_localstatedir}/lib/imagefactory/images %config %{_sysconfdir}/pki/imagefactory/cert-ec2.pem -%dir %{python_sitelib}/imgfac +%dir %{python2_sitelib}/imgfac %{python2_sitelib}/imgfac/*.py* %{python2_sitelib}/imgfac/rest %{python2_sitelib}/imgfac/picklingtools