%if 0%{?fedora} %global with_python3 1 %endif Name: python-linux-procfs Version: 0.5 Release: 1%{?dist} License: GPLv2 Summary: Linux /proc abstraction classes Group: System Environment/Libraries Source: https://www.kernel.org/pub/software/libs/python/%{name}/%{name}-%{version}.tar.xz URL: https://rt.wiki.kernel.org/index.php/Tuna BuildArch: noarch BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) BuildRequires: python2-devel BuildRequires: python-setuptools %if 0%{?with_python3} BuildRequires: python3-devel BuildRequires: python3-setuptools %endif %global _description\ Abstractions to extract information from the Linux kernel /proc files. %description %_description %package -n python2-linux-procfs Summary: %summary %{?python_provide:%python_provide python2-linux-procfs} Requires: python-six %description -n python2-linux-procfs %_description %if 0%{?with_python3} %package -n python3-linux-procfs Summary: %summary %{?python_provide:%python_provide python3-linux-procfs} Requires: python3-six %description -n python3-linux-procfs %_description %endif %prep %autosetup %build %py2_build %if 0%{?with_python3} %py3_build %endif %install rm -rf %{buildroot} %py2_install install -D pflags-cmd.py %{buildroot}%{_bindir}/pflags %if 0%{?with_python3} %py3_install install -D pflags-cmd.py %{buildroot}%{_bindir}/pflags-3 sed -i '1s=^#! /usr/bin/python=#!%{__python3}=' %{buildroot}%{_bindir}/pflags-3 %endif %clean rm -rf %{buildroot} %files -n python2-linux-procfs %defattr(0755,root,root,0755) %{_bindir}/pflags %{python2_sitelib}/procfs/ %defattr(0644,root,root,0755) %{python2_sitelib}/python_linux_procfs*.egg-info %license COPYING %if 0%{?with_python3} %files -n python3-linux-procfs %defattr(0755,root,root,0755) %{_bindir}/pflags-3 %{python3_sitelib}/procfs/ %defattr(0644,root,root,0755) %{python3_sitelib}/python_linux_procfs*.egg-info %license COPYING %endif %changelog * Mon Nov 20 2017 Lumír Balhar - 0.5-1 - New upstream version - Python 3 subpackage * Sat Aug 19 2017 Zbigniew Jędrzejewski-Szmek - 0.4.10-4 - Python 2 binary package renamed to python2-linux-procfs See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3 * Thu Jul 27 2017 Fedora Release Engineering - 0.4.10-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild * Sat Feb 11 2017 Fedora Release Engineering - 0.4.10-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild * Thu Dec 22 2016 Jiri Kastner - 0.4.10-1 - update to latest release * Tue Jul 19 2016 Fedora Release Engineering - 0.4.6-7 - https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages * Thu Feb 04 2016 Fedora Release Engineering - 0.4.6-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild * Thu Jun 18 2015 Fedora Release Engineering - 0.4.6-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild * Fri Oct 10 2014 Jiri Kastner - 0.4.6-4 - fix source and url * Sat Jun 07 2014 Fedora Release Engineering - 0.4.6-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild * Sun Aug 04 2013 Fedora Release Engineering - 0.4.6-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild * Fri Jun 14 2013 Jiri Kastner - 0.4.6-1 - updated to 0.4.6 * Thu Jun 6 2013 Jiri Kastner - 0.4.5-1 - Added support for parsing cgroups as a per thread attribute * Thu Feb 14 2013 Fedora Release Engineering - 0.4.4-8 - Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild * Sat Jul 21 2012 Fedora Release Engineering - 0.4.4-7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild * Sat Jan 14 2012 Fedora Release Engineering - 0.4.4-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild * Tue Feb 08 2011 Fedora Release Engineering - 0.4.4-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild * Thu Jul 22 2010 David Malcolm - 0.4.4-4 - Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild * Sun Jul 26 2009 Fedora Release Engineering - 0.4.4-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild * Thu Feb 26 2009 Fedora Release Engineering - 0.4.4-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild * Tue Feb 10 2009 Arnaldo Carvalho de Melo - 0.4.4-1 - Even more fixes due to the fedora review process * Mon Feb 9 2009 Arnaldo Carvalho de Melo - 0.4.3-1 - Fixups due to the fedora review process * Tue Aug 12 2008 Arnaldo Carvalho de Melo - 0.4.2-1 - interrupts: Add find_by_user_regex - process: Always set the "cmdline" array, even if empty - pidstats: Remove dead processes in find_by_name() - pidstats: Add process class to catch dict references for late parsing - pidstats: Move the /proc/PID/{stat,status} parsing to classes - pidstats: Introduce process_flags method * Tue Aug 12 2008 Arnaldo Carvalho de Melo - 0.4-1 - Per process flags needed by tuna * Fri Jun 13 2008 Arnaldo Carvalho de Melo - 0.3-1 - Support CPU hotplug * Mon Feb 25 2008 Arnaldo Carvalho de Melo - 0.1-1 - package created