5a492a
%global srcname psutil
5a492a
%global sum A process and system utilities module for Python
5a492a
5a492a
# Filter Python modules from Provides
5a492a
%global __provides_exclude_from ^(%{python2_sitearch}|%{python3_sitearch})/.*\\.so$
5a492a
5a492a
%if 0%{?fedora}
5a492a
%global with_python3 1
5a492a
%endif
5a492a
5a492a
Name:           python-%{srcname}
5a492a
Version:        5.0.1
5a492a
Release:        2%{?dist}
5a492a
Provides:       python2-psutil = %{version}-%{release}
5a492a
Summary:        %{sum}
5a492a
5a492a
License:        BSD
5a492a
URL:            https://github.com/giampaolo/psutil
5a492a
Source0:        https://github.com/giampaolo/psutil/archive/release-%{version}.tar.gz#/%{srcname}-%{version}.tar.gz
5a492a
#
5a492a
# Disable upstream failing test
5a492a
# https://github.com/giampaolo/psutil/issues/946
5a492a
#
5a492a
Patch0:         psutil-5.0.1-disable-broken-tests.patch
5a492a
5a492a
BuildRequires:  python2-devel
5a492a
BuildRequires:  python-setuptools
5a492a
# Test dependencies
5a492a
BuildRequires:  procps-ng
5a492a
BuildRequires:  python-mock
5a492a
BuildRequires:  python-ipaddress
5a492a
5a492a
%description
5a492a
psutil is a module providing an interface for retrieving information on all
5a492a
running processes and system utilization (CPU, memory, disks, network, users) in
5a492a
a portable way by using Python, implementing many functionalities offered by
5a492a
command line tools such as: ps, top, df, kill, free, lsof, free, netstat,
5a492a
ifconfig, nice, ionice, iostat, iotop, uptime, pidof, tty, who, taskset, pmap.
5a492a
5a492a
5a492a
%if 0%{?with_python3}
5a492a
%package -n python%{python3_pkgversion}-psutil
5a492a
Summary:        %{sum}
5a492a
BuildRequires:  python%{python3_pkgversion}-devel
5a492a
BuildRequires:  python%{python3_pkgversion}-setuptools
5a492a
BuildRequires:  python%{python3_pkgversion}-mock
5a492a
%{?python_provide:%python_provide python%{python3_pkgversion}-%{srcname}}
5a492a
5a492a
%description -n python%{python3_pkgversion}-psutil
5a492a
psutil is a module providing an interface for retrieving information on all
5a492a
running processes and system utilization (CPU, memory, disks, network, users) in
5a492a
a portable way by using Python 3, implementing many functionalities offered by
5a492a
command line tools such as: ps, top, df, kill, free, lsof, free, netstat,
5a492a
ifconfig, nice, ionice, iostat, iotop, uptime, pidof, tty, who, taskset, pmap.
5a492a
%endif
5a492a
5a492a
5a492a
%prep
5a492a
%autosetup -p1 -n %{srcname}-release-%{version}
5a492a
5a492a
# Remove shebangs
5a492a
find psutil -name \*.py | while read file; do
5a492a
  sed -i.orig -e '1{/^#!/d}' $file && \
5a492a
  touch -r $file.orig $file && \
5a492a
  rm $file.orig
5a492a
done
5a492a
5a492a
5a492a
%build
5a492a
CFLAGS="%{optflags}" %{__python} setup.py %{?py_setup_args} build --executable="%{__python2} -s"
5a492a
%if 0%{?with_python3}
5a492a
%py3_build
5a492a
%endif
5a492a
5a492a
5a492a
%install
5a492a
CFLAGS="%{optflags}" %{__python} setup.py %{?py_setup_args} install -O1 --skip-build --root %{buildroot}
5a492a
%if 0%{?with_python3}
5a492a
%py3_install
5a492a
%endif
5a492a
5a492a
5a492a
%check
5a492a
5a492a
5a492a
%files -n python-%{srcname}
5a492a
%license LICENSE
5a492a
%doc CREDITS HISTORY.rst README.rst
5a492a
%{python2_sitearch}/%{srcname}/
5a492a
%{python2_sitearch}/*.egg-info
5a492a
5a492a
5a492a
%if 0%{?with_python3}
5a492a
%files -n python%{python3_pkgversion}-%{srcname}
5a492a
%license LICENSE
5a492a
%doc CREDITS HISTORY.rst README.rst
5a492a
%{python3_sitearch}/%{srcname}/
5a492a
%{python3_sitearch}/*.egg-info
5a492a
%endif
5a492a
5a492a
5a492a
%changelog
5a492a
* Wed Apr 04 2018 Patrick Creech <pcreech@redhat.com> - 5.0.1-2
5a492a
- Satellite 6.4.0 rebuild
5a492a
5a492a
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 5.0.1-2
5a492a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
5a492a
5a492a
* Mon Jan 02 2017 Kevin Fenzi <kevin@scrye.com> - 5.0.1-1
5a492a
- Update to 5.0.1. Fixes bug #1389579
5a492a
- Disable failing test while upstream looks at it.
5a492a
5a492a
* Wed Nov 09 2016 Kevin Fenzi <kevin@scrye.com> - 5.0.0-1
5a492a
- Update to 5.0.0. Fixes bug #1389579
5a492a
5a492a
* Tue Oct 25 2016 Kevin Fenzi <kevin@scrye.com> - 4.4.0-1
5a492a
- Update to 4.4.0. Fixes bug #1387942
5a492a
5a492a
* Sat Sep 03 2016 Kevin Fenzi <kevin@scrye.com> - 4.3.1-1
5a492a
- Update to 4.3.1. Fixes bug #1372500
5a492a
5a492a
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.3.0-2
5a492a
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
5a492a
5a492a
* Tue Jun 21 2016 Orion Poplawski <orion@cora.nwra.com> - 4.3.0-1
5a492a
- Update to 4.3.0
5a492a
5a492a
* Mon May 16 2016 Orion Poplawski <orion@cora.nwra.com> - 3.2.1-6
5a492a
- Use modern provides filter
5a492a
- Update URL
5a492a
- Use %%python3_pkgversion for EPEL7 compat
5a492a
5a492a
* Fri Mar 11 2016 Than Ngo <than@redhat.com> - 3.2.1-5
5a492a
- fix endian issue on s390x/ppc64
5a492a
5a492a
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 3.2.1-4
5a492a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
5a492a
5a492a
* Tue Nov 10 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.2.1-3
5a492a
- Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5
5a492a
5a492a
* Fri Sep  4 2015 Michel Alexandre Salim <salimma@fedoraproject.org> - 3.2.1-2
5a492a
- Add Obsoletes for old package
5a492a
5a492a
* Fri Sep  4 2015 Michel Alexandre Salim <salimma@fedoraproject.org> - 3.2.1-1
5a492a
- Update to 3.2.1
5a492a
- Update to latest Python guidelines (https://fedorahosted.org/fpc/ticket/281)
5a492a
5a492a
* Wed Jul 22 2015 Michel Alexandre Salim <salimma@fedoraproject.org> - 3.1.1-2
5a492a
- Restore *.so files
5a492a
- Enable tests
5a492a
5a492a
* Tue Jul 21 2015 Michel Alexandre Salim <salimma@fedoraproject.org> - 3.1.1-1
5a492a
- Update to 3.1.1
5a492a
5a492a
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.2.0-2
5a492a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
5a492a
5a492a
* Wed Feb 18 2015 Ralph Bean <rbean@redhat.com> - 2.2.0-1
5a492a
- new version
5a492a
5a492a
* Wed Dec  3 2014 Michel Alexandre Salim <salimma@fedoraproject.org> - 2.1.3-1
5a492a
- Update to 2.1.3
5a492a
5a492a
* Sun Aug 17 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2.1-5
5a492a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
5a492a
5a492a
* Thu Jul 31 2014 Tom Callaway <spot@fedoraproject.org> - 1.2.1-4
5a492a
- fix license handling
5a492a
5a492a
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2.1-3
5a492a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
5a492a
5a492a
* Wed May 28 2014 Kalev Lember <kalevlember@gmail.com> - 1.2.1-2
5a492a
- Rebuilt for https://fedoraproject.org/wiki/Changes/Python_3.4
5a492a
5a492a
* Mon Jan 06 2014 Mohamed El Morabity <melmorabity@fedoraproject.org> - 1.2.1-1
5a492a
- Update to 1.2.1
5a492a
5a492a
* Fri Aug 16 2013 Mohamed El Morabity <melmorabity@fedoraproject.org> - 1.0.1-1
5a492a
- Update to 1.0.1
5a492a
5a492a
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.7.1-2
5a492a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
5a492a
5a492a
* Sun May 12 2013 Mohamed El Morabity <melmorabity@fedoraproject.org> - 0.7.1-1
5a492a
- Update to 0.7.1
5a492a
5a492a
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.6.1-2
5a492a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
5a492a
5a492a
* Sun Aug 19 2012 Mohamed El Morabity <melmorabity@fedorapeople.org> - 0.6.1-1
5a492a
- Update to 0.6.1
5a492a
5a492a
* Sat Aug 04 2012 David Malcolm <dmalcolm@redhat.com> - 0.5.1-3
5a492a
- rebuild for https://fedoraproject.org/wiki/Features/Python_3.3
5a492a
5a492a
* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.5.1-2
5a492a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
5a492a
5a492a
* Sun Jul 01 2012 Mohamed El Morabity <melmorabity@fedoraproject.org> - 0.5.1-1
5a492a
- Update to 0.5.1
5a492a
5a492a
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.4.1-2
5a492a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
5a492a
5a492a
* Fri Dec 16 2011 Mohamed El Morabity <melmorabity@fedoraproject.org> - 0.4.1-1
5a492a
- Update to 0.4.1
5a492a
5a492a
* Sun Nov 20 2011 Mohamed El Morabity <melmorabity@fedoraproject.org> - 0.4.0-1
5a492a
- Update to 0.4.0
5a492a
5a492a
* Mon Jul 18 2011 Mohamed El Morabity <melmorabity@fedoraproject.org> - 0.3.0-1
5a492a
- Update to 0.3.0
5a492a
5a492a
* Wed Mar 23 2011 Mohamed El Morabity <melmorabity@fedoraproject.org> - 0.2.1-1
5a492a
- Update to 0.2.1
5a492a
- Spec cleanup
5a492a
5a492a
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.2.0-2
5a492a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
5a492a
5a492a
* Mon Nov 22 2010 Mohamed El Morabity <melmorabity@fedoraproject.org> - 0.2.0-1
5a492a
- Update to 0.2.0
5a492a
5a492a
* Wed Aug 25 2010 Thomas Spura <tomspur@fedoraproject.org> - 0.1.3-5
5a492a
- rebuild with python3.2
5a492a
  http://lists.fedoraproject.org/pipermail/devel/2010-August/141368.html
5a492a
5a492a
* Fri Jul 30 2010 Thomas Spura <tomspur@fedoraproject.org> - 0.1.3-4
5a492a
- bump, because previous build nvr already existed in F-14
5a492a
5a492a
* Thu Jul 22 2010 David Malcolm <dmalcolm@redhat.com> - 0.1.3-3
5a492a
- Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild
5a492a
5a492a
* Tue Apr 13 2010 ELMORABITY Mohamed <melmorabity@fedoraproject.org> 0.1.3-2
5a492a
- Add missing popd in %%build
5a492a
5a492a
* Sat Mar 27 2010 ELMORABITY Mohamed <melmorabity@fedoraproject.org> 0.1.3-1
5a492a
- Update to 0.1.3
5a492a
- Remove useless call to 2to3 and corresponding BuildRequires
5a492a
  python2-tools (this version supports Python 3)
5a492a
5a492a
* Sat Feb 20 2010 ELMORABITY Mohamed <melmorabity@fedoraproject.org> 0.1.2-4
5a492a
- Change python-utils BuildRequires for python2-utils
5a492a
5a492a
* Sat Feb 20 2010 ELMORABITY Mohamed <melmorabity@fedoraproject.org> 0.1.2-3
5a492a
- Add python3 subpackage
5a492a
5a492a
* Thu Jan 14 2010 ELMORABITY Mohamed <melmorabity@fedoraproject.org> 0.1.2-2
5a492a
- Drop no-shebang patch for a sed command
5a492a
- Drop test suite from %%doc tag
5a492a
5a492a
* Fri Jan  8 2010 ELMORABITY Mohamed <melmorabity@fedoraproject.org> 0.1.2-1
5a492a
- Initial RPM release