[sos/f22] build sos for python3

Bryn Reeves bmr at fedoraproject.org
Thu Feb 19 18:56:10 UTC 2015


commit 42637e3c227cc052d270415815743ccfec9e2bf0
Author: Bryn M. Reeves <bmr at redhat.com>
Date:   Thu Feb 19 18:55:52 2015 +0000

    build sos for python3

 sos.spec | 18 +++++++++++-------
 1 file changed, 11 insertions(+), 7 deletions(-)
---
diff --git a/sos.spec b/sos.spec
index 5672bbe..504b507 100644
--- a/sos.spec
+++ b/sos.spec
@@ -1,18 +1,17 @@
-%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
 Summary: A set of tools to gather troubleshooting information from a system
 Name: sos
 Version: 3.2
-Release: 15%{?dist}
+Release: 16%{?dist}
 Group: Applications/System
 Source0: https://github.com/sosreport/sos/archive/%{version}/sos-%{version}.tar.gz
 License: GPLv2+
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
 BuildArch: noarch
 Url: http://github.com/sosreport/sos
-BuildRequires: python-devel
+BuildRequires: python3-devel
 BuildRequires: gettext
 Requires: libxml2-python
-Requires: python-six
+Requires: python3-six
 Requires: bzip2
 Requires: xz
 Obsoletes: sos-plugins-openstack
@@ -40,6 +39,7 @@ Patch20: sos-ctdb-fix-redhatplugin-tagging-use.patch
 Patch21: sos-sosreport-fix-silent-exception-handling.patch
 Patch22: sos-mysql-test-for-boolean-values.patch
 Patch23: sos-mysql-improve-dbuser-dbpass-handling.patch
+Patch24: sos-install-sos_conf-from-setup_py.patch
 
 %description
 Sos is a set of tools that gathers information about system
@@ -73,13 +73,14 @@ support technicians and developers.
 %patch21 -p1
 %patch22 -p1
 %patch23 -p1
+%patch24 -p1
 
 %build
 make
 
 %install
 rm -rf ${RPM_BUILD_ROOT}
-make DESTDIR=${RPM_BUILD_ROOT} install
+python3 setup.py install --root ${RPM_BUILD_ROOT} --install-scripts %{_sbindir}
 %find_lang %{name} || echo 0
 
 %clean
@@ -88,14 +89,17 @@ rm -rf ${RPM_BUILD_ROOT}
 %files -f %{name}.lang
 %defattr(-,root,root,-)
 %{_sbindir}/sosreport
-%{_datadir}/%{name}
-%{python_sitelib}/*
+%{python3_sitelib}/*
 %{_mandir}/man1/*
 %{_mandir}/man5/*
 %doc AUTHORS README.md LICENSE 
 %config(noreplace) %{_sysconfdir}/sos.conf
 
 %changelog
+* Thu Feb 19 2015 Bryn M. Reeves <bmr at redhat.com> = 3.2-16
+- [global] build for python3
+  Resolves: bz1014595
+
 * Thu Jan 22 2015 Bryn M. Reeves <bmr at redhat.com> = 3.2-15
 - [mysql] improve handling of dbuser, dbpass and MYSQL_PWD
   Resolves: bz1180919


More information about the scm-commits mailing list