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 shortcommit %(c=%{commit}; echo ${c:0:7})
Summary: A set of tools to gather troubleshooting information from a system
Name: sos
Version: 3.2
Release: 0.2.a%{?dist}
Release: 0.3.a%{?dist}
Group: Applications/System
Source0: https://github.com/sosreport/sos/archive/%{commit}.tar.gz#/%{name}-%{commit}.tar.gz
License: GPLv2+
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
BuildArch: noarch
Url: http://fedorahosted.org/sos
BuildRequires: python-devel
BuildRequires: python3-devel
BuildRequires: gettext
Requires: libxml2-python
Requires: rpm-python
Requires: libxml2-python3
Requires: rpm-python3
Requires: tar
Requires: bzip2
Requires: xz
@ -28,28 +26,31 @@ support technicians and developers.
%prep
# deal with github tarball naming scheme
%setup -q -n %{name}-%{commit}
%build
make
%{__python3} setup.py build
%install
rm -rf ${RPM_BUILD_ROOT}
make DESTDIR=${RPM_BUILD_ROOT} install
%{__python3} setup.py install --skip-build --root %{buildroot} --install-scripts %{_sbindir}
install -Dm644 %{name}.conf %{buildroot}%{_sysconfdir}/%{name}.conf
%find_lang %{name} || echo 0
%clean
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
* 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
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild