# # spec file for package python-psutil # # Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via http://bugs.opensuse.org/ # Name: python-psutil Version: 3.1.1 Release: 1.1 Summary: A process utilities module for Python License: BSD-3-Clause Group: Development/Languages/Python Url: https://pypi.python.org/pypi/psutil/ Source: https://pypi.python.org/packages/source/p/psutil/psutil-%{version}.tar.gz BuildRequires: python-devel BuildRequires: python-setuptools BuildRequires: net-tools BuildRequires: procps Requires: net-tools Requires: procps BuildRoot: %{_tmppath}/%{name}-%{version}-build %if 0%{?suse_version} && 0%{?suse_version} <= 1110 %{!?python_sitearch: %global python_sitearch %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")} %endif %description A graphical interface that lets you easily analyze and introspect unaltered running Python processes. %prep %setup -q -n psutil-%{version} # Remove shebangs sed -i "1d" psutil/{__init__.py,_compat.py,_psbsd.py,_pslinux.py,_psosx.py,_psposix.py,_pssunos.py,_pswindows.py} %build python setup.py build %install python setup.py install --prefix=%{_prefix} --root=%{buildroot} # not working due to lack of root priveleges # %check # make test # make memtest %files %defattr(-,root,root,-) %doc CREDITS examples HISTORY.rst LICENSE README.rst TODO %{python_sitearch}/psutil/ %{python_sitearch}/psutil/_psutil_*.so %{python_sitearch}/psutil-%{version}-py*.egg-info %changelog * Wed Jul 15 2015 michael@stroeder.com - update to version 3.1.1: New fatures ========= - [Linux] disk_partitions() added support for ZFS filesystems. - continuous tests integration for Windows - continuous code quality test integration Main bugfixes =========== - [Windows] Process.open_files() no longer hangs. Instead it uses a thred which times out and skips the file handle in case it's taking too long to be retrieved. (patch by Jeff Tang) - [Windows] Process.name() no longer raises AccessDenied for pids owned by another user. - [Windows] Process.memory_info() no longer raises AccessDenied for pids owned by another user. - [Linux] Process.cmdline() can be truncated. - [Windows] add inet_ntop function for Windows XP to support IPv6. * Mon Jun 29 2015 toddrme2178@gmail.com - update to version 3.0.1: * #632: [Linux] better error message if cannot parse process UNIX connections. * #634: [Linux] Proces.cmdline() does not include empty string arguments. * #635: [UNIX] crash on module import if 'enum' package is installed on python < 3.4. - update to version 3.0.0: * Enhancements + #250: new psutil.net_if_stats() returning NIC statistics (isup, duplex, speed, MTU). + #376: new psutil.net_if_addrs() returning all NIC addresses a-la ifconfig. + #469: on Python >= 3.4 IOPRIO_CLASS_* and *_PRIORITY_CLASS constants returned by psutil.Process' ionice() and nice() methods are enums instead of plain integers. + #581: add .gitignore. (patch by Gabi Davar) + #582: connection constants returned by psutil.net_connections() and psutil.Process.connections() were turned from int to enums on Python > 3.4. + #587: Move native extension into the package. + #589: Process.cpu_affinity() accepts any kind of iterable (set, tuple, ...), not only lists. + #594: all deprecated APIs were removed. + #599: [Windows] process name() can now be determined for all processes even when running as a limited user. + #602: pre-commit GIT hook. + #629: enhanced support for py.test and nose test discovery and tests run. + #616: [Windows] Add inet_ntop function for Windows XP. * Bug fixes + #428: [all UNIXes except Linux] correct handling of zombie processes; introduced new ZombieProcess exception class. + #512: [BSD] fix segfault in net_connections(). + #555: [Linux] psutil.users() correctly handles ":0" as an alias for "localhost" + #579: [Windows] Fixed open_files() for PID>64K. + #579: [Windows] fixed many compiler warnings. + #585: [FreeBSD] net_connections() may raise KeyError. + #586: [FreeBSD] cpu_affinity() segfaults on set in case an invalid CPU number is provided. + #593: [FreeBSD] Process().memory_maps() segfaults. + #606: Process.parent() may swallow NoSuchProcess exceptions. + #611: [SunOS] net_io_counters has send and received swapped + #614: [Linux]: cpu_count(logical=False) return the number of physical CPUs instead of physical cores. + #618: [SunOS] swap tests fail on Solaris when run as normal user + #628: [Linux] Process.name() truncates process name in case it contains spaces or parentheses. - specfile: * location of .so files changes to subdir psutil * Mon Feb 2 2015 michael@stroeder.com - Update to 2.2.1: - Fixed #572 ValueError: ambiguos inode with multiple PIDs references * Tue Jan 6 2015 michael@stroeder.com - Update to 2.2.0: - FreeBSD has now support for process CPU affinity - new pstree.py and pidof.py example scripts - C extension version mismatch in case the user messed up with psutil installation or with sys.path is now detected at import time - [Linux] a lot of file descriptors were left open - [Windows] use proper encoding for psutil.Process.username() and psutil.users(). - [Solaris] fixed a high-priority bug which crashed psutil on import. * Tue Nov 18 2014 toddrme2178@gmail.com - Update to 2.1.3 * fix "undefined symbol: CPU_ALLOC" compilation error. * Tue Sep 30 2014 toddrme2178@gmail.com - Update documentation files - Spec file cleanups - Update shebang fix - Disable broken unit tests: tests don't work without root permissions - Update dependencies. We should actually guarantee psutil and so on are installed. - Update urls - Update to version 2.1.2 * Enhancements * #407: project moved from Google Code to Github; code moved from Mercurial to Git. * #492: use tox to run tests on multiple python versions. (patch by msabramo) * #505: [Windows] distribution as wheel packages. * #511: new examples/ps.py sample code. * Bug fixes * #340: [Windows] Process.get_open_files() no longer hangs. (patch by Jeff Tang) * #501: [Windows] disk_io_counters() may return negative values. * #503: [Linux] in rare conditions Process exe(), open_files() and connections() methods can raise OSError(ESRCH) instead of NoSuchProcess. * #504: [Linux] can't build RPM packages via setup.py * #506: [Linux] python 2.4 support was broken. * #522: [Linux] Process.cpu_affinity() might return EINVAL. (patch by David Daeschler) * #529: [Windows] Process.exe() may raise unhandled WindowsError exception for PIDs 0 and 4. (patch by Jeff Tang) * #530: [Linux] psutil.disk_io_counters() may crash on old Linux distros (< 2.6.5) (patch by Yaolong Huang) * #533: [Linux] Process.memory_maps() may raise TypeError on old Linux distros. - Update to version 2.1.1 * Bug fixes * #446: [Windows] fix encoding error when using net_io_counters() on Python 3. (patch by Szigeti Gabor Niif) * #460: [Windows] net_io_counters() wraps after 4G. * #491: [Linux] psutil.net_connections() exceptions. (patch by Alexander Grothe) - Update to version 2.1.0 * Enhancements * #387: system-wide open connections a-la netstat. * Bug fixes * #421: [Solaris] psutil does not compile on SunOS 5.10 (patch by Naveed Roudsari) * #489: [Linux] psutil.disk_partitions() return an empty list. - Update to version 2.0.0 * Enhancements * #424: [Windows] installer for Python 3.X 64 bit. * #427: number of logical and physical CPUs (psutil.cpu_count()). * #447: psutil.wait_procs() timeout parameter is now optional. * #452: make Process instances hashable and usable with set()s. * #453: tests on Python < 2.7 require unittest2 module. * #459: add a make file for running tests and other repetitive tasks (also on Windows). * #463: make timeout parameter of cpu_percent* functions default to 0.0 'cause it's a common trap to introduce slowdowns. * #468: move documentation to readthedocs.com. * #477: process cpu_percent() is about 30%% faster. (suggested by crusaderky) * #478: [Linux] almost all APIs are about 30%% faster on Python 3.X. * #479: long deprecated psutil.error module is gone; exception classes now live in "psutil" namespace only. * Bug fixes * #193: psutil.Popen constructor can throw an exception if the spawned process terminates quickly. * #340: [Windows] process get_open_files() no longer hangs. (patch by jtang@vahna.net) * #443: [Linux] fix a potential overflow issue for Process.set_cpu_affinity() on systems with more than 64 CPUs. * #448: [Windows] get_children() and ppid() memory leak (patch by Ulrich Klank). * #457: [POSIX] pid_exists() always returns True for PID 0. * #461: namedtuples are not pickle-able. * #466: [Linux] process exe improper null bytes handling. (patch by Gautam Singh) * #470: wait_procs() might not wait. (patch by crusaderky) * #471: [Windows] process exe improper unicode handling. (patch by alex@mroja.net) * #473: psutil.Popen.wait() does not set returncode attribute. * #474: [Windows] Process.cpu_percent() is no longer capped at 100%%. * #476: [Linux] encoding error for process name and cmdline. * API changes For the sake of consistency a lot of psutil APIs have been renamed. In most cases accessing the old names will work but it will cause a DeprecationWarning. * psutil.* module level constants have being replaced by functions * Renamed psutil.* functions * All psutil.Process ``get_*`` methods lost the ``get_`` prefix. get_ext_memory_info() renamed to memory_info_ex(). Assuming "p = psutil.Process()" * All psutil.Process ``set_*`` methods lost the ``set_`` prefix. Assuming "p = psutil.Process()" * Except for 'pid' all psutil.Process class properties have been turned into methods. This is the only case which there are no aliases. Assuming "p = psutil.Process()" * timeout parameter of cpu_percent* functions defaults to 0.0 instead of 0.1. * long deprecated psutil.error module is gone; exception classes now live in "psutil" namespace only. * Process instances' "retcode" attribute returned by psutil.wait_procs() has been renamed to "returncode" for consistency with subprocess.Popen. * Wed Nov 27 2013 p.drouand@gmail.com - Update to version 1.2.1 * #348: [Windows XP] fixed "ImportError: DLL load failed" occurring on module import. * #425: [Solaris] crash on import due to failure at determining BOOT_TIME. * #443: [Linux] can't set CPU affinity with systems with more than 64 cores. - Changes from version 1.2.0 * #439: assume os.getpid() if no argument is passed to psutil.Process constructor. * #440: new psutil.wait_procs() utility function which waits for multiple processes to terminate. * #348: [Windows XP/Vista] fixed "ImportError: DLL load failed" occurring on module import. - Changes from version 1.1.3 * #442: [Linux] psutil won't compile on certain version of Linux because of missing prlimit(2) syscall. - Changes from version 1.1.2 * #442: [Linux] psutil won't compile on Debian 6.0 because of missing prlimit(2) syscall. * Mon Oct 21 2013 dmueller@suse.com - update to 1.1.1: * #410: tar.gz and windows binary files are now hosted on PYPI. * #412: [Linux] get/set process resource limits. * #415: [Windows] Process.get_children() is an order of magnitude faster. * #426: [Windows] Process.name is an order of magnitude faster. * #431: [UNIX] Process.name is slightly faster because it unnecessarily retrieved also process cmdline. * Fri Jul 19 2013 dmueller@suse.com - update to 1.0.1: * network_io_counters(pernic=True) no longer works as intended in 1.0.0. * Thu Jul 11 2013 dmueller@suse.com - update to 1.0.0: * Process.get_connections() 'status' strings are now constants. * test suite exits with non-zero on failure. (patch by floppymaster) * extensively use unittest2 module in unit tests and provide workarounds if this is not installed on python < 2.7. * Process.get_memory_maps() may raise ValueError. * Process.get_connections() 'status' field is no longer a string but a constant object (psutil.CONN_*). * Process.get_connections() 'local_address' and 'remote_address' fields renamed to 'laddr' and 'raddr'. * psutil.network_io_counters() renamed to psutil.net_io_counters(). * Tue May 7 2013 michael@stroeder.com - Update to upstream release 0.7.1: Many bug fixes, some new features and API changes * Wed Jan 2 2013 toddrme2178@gmail.com - Fix building on SLES * Sat Oct 6 2012 os-dev@jacraig.com - Update to 0.6.1: * process cmdline property now makes a better job at guessing the process executable from the cmdline. * process exe was resolved in case it was a symlink. * python 2.4 compatibility was broken. * process exe can now return an empty string instead of raising AccessDenied. * process exe is no longer resolved in case it's a symlink. - Tons of changes from previous versions, please see HISTORY. - Remove references to docs directory in spec file, as it no longer exists. - Remove unnecessary shebangs from python scripts to quiet rpmlint. * Fri May 25 2012 highwaystar.ru@gmail.com - python3 package added - minor spec improvement * Tue Apr 24 2012 saschpe@suse.de - It's not a noarch package * Fri Mar 23 2012 saschpe@suse.de - Spec file cleanup: * No need for setuptools here, distribute replaces it completely * Macro simplifcation * Mon Mar 19 2012 cfarrell@suse.com - First import