diff options
author | Giampaolo Rodola <g.rodola@gmail.com> | 2017-01-15 18:18:44 +0100 |
---|---|---|
committer | Giampaolo Rodola <g.rodola@gmail.com> | 2017-01-15 18:18:44 +0100 |
commit | 16a3af5d64bf21c692d3db737b482fe4c8711140 (patch) | |
tree | 449ac811aa027c793b1c5ffc6163e346a2bd0856 | |
parent | 6e60cc93c68f243dcaf3c895fcd8a9fabcedba4b (diff) | |
download | psutil-16a3af5d64bf21c692d3db737b482fe4c8711140.tar.gz |
update doc + add linux specific test
-rw-r--r-- | INSTALL.rst | 13 | ||||
-rw-r--r-- | docs/index.rst | 5 | ||||
-rwxr-xr-x | psutil/tests/test_linux.py | 3 | ||||
-rwxr-xr-x | setup.py | 1 |
4 files changed, 18 insertions, 4 deletions
diff --git a/INSTALL.rst b/INSTALL.rst index fcbc3736..d731bd3d 100644 --- a/INSTALL.rst +++ b/INSTALL.rst @@ -5,12 +5,13 @@ pip is the easiest way to install psutil. It is shipped by default with Python 2.7.9+ and 3.4+. If you're using an older Python version `install pip <https://pip.pypa.io/en/latest/installing/>`__ first. -If you GIT cloned psutil source code you can also install pip with:: +If you GIT cloned psutil source code you can also install pip and/or upgrade +it to latest version with:: make install-pip Unless you're on Windows, in order to install psutil with pip you'll also need -a C compiler installed. +a C compiler installed (e.g. gcc). pip will retrieve psutil source code or binaries from `PYPI <https://pypi.python.org/pypi/psutil>`__ repository. @@ -137,6 +138,14 @@ Install: pkg install gcc python -m pip install psutil +Install from sources +==================== + + git clone https://github.com/giampaolo/psutil.git + cd psutil + python setup.py install + + Dev Guide ========= diff --git a/docs/index.rst b/docs/index.rst index 022c6a6b..270124b7 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -39,11 +39,12 @@ The psutil documentation you're reading is distributed as a single HTML page. Install ------- -On Windows, or on UNIX if you have a C compiler installed, the easiest way to -install psutil is via ``pip``:: +The easiest way to install psutil is via ``pip``:: pip install psutil +On UNIX this requires a C compiler (e.g. gcc) installed. On Windows pip will +automatically retrieve a pre-compiled wheel version. Alternatively, see more detailed `install <https://github.com/giampaolo/psutil/blob/master/INSTALL.rst>`_ instructions. diff --git a/psutil/tests/test_linux.py b/psutil/tests/test_linux.py index 028a41d9..814cabd6 100755 --- a/psutil/tests/test_linux.py +++ b/psutil/tests/test_linux.py @@ -1079,6 +1079,9 @@ class TestProcess(unittest.TestCase): self.assertAlmostEqual( p.num_ctx_switches().involuntary, invol, delta=2) + elif line.startswith('Cpus_allowed_list'): + min_, max_ = map(int, line.split()[1].split('-')) + self.assertEqual(p.cpu_affinity(), range(min_, max_ + 1)) def test_memory_full_info(self): src = textwrap.dedent(""" @@ -301,6 +301,7 @@ def main(): 'Programming Language :: Python :: 3.3', 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', + 'Programming Language :: Python :: 3.6', 'Programming Language :: Python :: Implementation :: CPython', 'Programming Language :: Python :: Implementation :: PyPy', 'Programming Language :: Python', |