1
0
forked from rpms/sos

Use Python 3 (#1014595)

This commit is contained in:
Miro Hrončok 2015-07-17 15:04:11 +02:00
parent 633c375658
commit ce086da9aa

View File

@ -1,20 +1,18 @@
%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
%global commit 55c89eb6810e7060845082845653b059aab90e3d %global commit 55c89eb6810e7060845082845653b059aab90e3d
%global shortcommit %(c=%{commit}; echo ${c:0:7}) %global shortcommit %(c=%{commit}; echo ${c:0:7})
Summary: A set of tools to gather troubleshooting information from a system Summary: A set of tools to gather troubleshooting information from a system
Name: sos Name: sos
Version: 3.2 Version: 3.2
Release: 0.2.a%{?dist} Release: 0.3.a%{?dist}
Group: Applications/System Group: Applications/System
Source0: https://github.com/sosreport/sos/archive/%{commit}.tar.gz#/%{name}-%{commit}.tar.gz Source0: https://github.com/sosreport/sos/archive/%{commit}.tar.gz#/%{name}-%{commit}.tar.gz
License: GPLv2+ License: GPLv2+
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
BuildArch: noarch BuildArch: noarch
Url: http://fedorahosted.org/sos Url: http://fedorahosted.org/sos
BuildRequires: python-devel BuildRequires: python3-devel
BuildRequires: gettext BuildRequires: gettext
Requires: libxml2-python Requires: libxml2-python3
Requires: rpm-python Requires: rpm-python3
Requires: tar Requires: tar
Requires: bzip2 Requires: bzip2
Requires: xz Requires: xz
@ -28,28 +26,31 @@ support technicians and developers.
%prep %prep
# deal with github tarball naming scheme # deal with github tarball naming scheme
%setup -q -n %{name}-%{commit} %setup -q -n %{name}-%{commit}
%build %build
make %{__python3} setup.py build
%install %install
rm -rf ${RPM_BUILD_ROOT} %{__python3} setup.py install --skip-build --root %{buildroot} --install-scripts %{_sbindir}
make DESTDIR=${RPM_BUILD_ROOT} install
install -Dm644 %{name}.conf %{buildroot}%{_sysconfdir}/%{name}.conf
%find_lang %{name} || echo 0 %find_lang %{name} || echo 0
%clean
rm -rf ${RPM_BUILD_ROOT}
%files -f %{name}.lang %files -f %{name}.lang
%defattr(-,root,root,-)
%{_sbindir}/sosreport %{_sbindir}/sosreport
%{_datadir}/%{name} %{python3_sitelib}/*
%{python_sitelib}/*
%{_mandir}/man1/* %{_mandir}/man1/*
%{_mandir}/man5/* %{_mandir}/man5/*
%doc AUTHORS README.md LICENSE %doc AUTHORS README.md LICENSE
%config(noreplace) %{_sysconfdir}/sos.conf %config(noreplace) %{_sysconfdir}/sos.conf
%changelog %changelog
* Fri Jul 17 2015 Miro Hrončok <mhroncok@redhat.com> - 3.2-0.3.a
- Use Python 3 (#1014595)
- Use setup.py instead of make
- Remove some deprecated statements
* Fri Jun 19 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.2-0.2.a * Fri Jun 19 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.2-0.2.a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild