diff options
author | Giampaolo Rodola <g.rodola@gmail.com> | 2020-12-19 12:58:27 +0100 |
---|---|---|
committer | Giampaolo Rodola <g.rodola@gmail.com> | 2020-12-19 12:58:27 +0100 |
commit | a12dda352d8309048400b337521a780b8884e8cd (patch) | |
tree | ba6aec51ed78ee0aa98bcf8b295d93663ac496a5 | |
parent | b760f4848db4db49de57918660f6a5059666b720 (diff) | |
download | psutil-a12dda352d8309048400b337521a780b8884e8cd.tar.gz |
update INSTALL.rst + fix CI failures
Signed-off-by: Giampaolo Rodola <g.rodola@gmail.com>
-rw-r--r-- | INSTALL.rst | 27 | ||||
-rw-r--r-- | README.rst | 13 | ||||
-rwxr-xr-x | psutil/tests/test_process.py | 6 | ||||
-rwxr-xr-x | psutil/tests/test_testutils.py | 1 |
4 files changed, 24 insertions, 23 deletions
diff --git a/INSTALL.rst b/INSTALL.rst index 88cef33f..53969d9a 100644 --- a/INSTALL.rst +++ b/INSTALL.rst @@ -4,10 +4,8 @@ Install psutil Linux, Windows, macOS (wheels) ------------------------------ -psutil makes extensive use of C extension modules, meaning a C compiler is -required to build the sources. -Pre-compiled cPython wheels are provided on each release though, so on -**Linux**, **Windows** and **macOS** all you have to do is:: +Pre-compiled wheels are distributed on each release for ***Linux**, **Windows** +and **macOS**, so you don't need a C compiler. All you have to do is:: pip3 install --user psutil @@ -15,8 +13,8 @@ This (``--user``) will install psutil as a limited user (not system-wide). If wheels are not available for your platform or architecture, or you whish to install psutil from sources, keep reading. -Linux (install from sources) ----------------------------- +Linux (build) +------------- Ubuntu / Debian:: @@ -28,10 +26,10 @@ RedHat / CentOS:: sudo yum install gcc python3-devel pip3 install --user --no-binary :all: psutil -Windows (install from sources) ------------------------------- +Windows (build) +--------------- -In order to compile psutil on Windows you'll need **Visual Studio** compiler +In order to install psutil from sources on Windows you need **Visual Studio** (**MinGW** is not supported). Here's a couple of guides describing how to do it: `link <https://blog.ionelmc.ro/2014/12/21/compiling-python-extensions-on-windows/>`__ and `link <https://cpython-core-tutorial.readthedocs.io/en/latest/build_cpython_windows.html>`__. @@ -39,6 +37,13 @@ Once VS is installed do:: pip3 install --user --no-binary :all: psutil +macOS (build) +------------- + +Install `Xcode <https://developer.apple.com/downloads/?name=Xcode>`__ then run:: + + pip3 install psutil + FreeBSD ------- @@ -96,7 +101,7 @@ If you don't have pip you can install with wget:: On Windows, `download pip <https://pip.pypa.io/en/latest/installing/>`__, open cmd.exe and install it with:: - C:\Python27\python.exe get-pip.py + py get-pip.py "pip not found" --------------- @@ -110,6 +115,6 @@ Permission errors (UNIX) ------------------------ If you want to install psutil system-wide and you bump into permission errors -either run as root or prepend ``sudo``:: +either run as root user or prepend ``sudo``:: sudo pip3 install psutil @@ -110,7 +110,7 @@ immensely from some funding. Keeping up with bug reports and maintenance has become hardly sustainable for me alone in terms of time. If you're a company that's making significant use of psutil you can consider -becoming a sponsor via `GitHub <https://github.com/sponsors/giampaolo>`__, +becoming a sponsor via `GitHub Sponsors <https://github.com/sponsors/giampaolo>`__, `Open Collective <https://opencollective.com/psutil>`__ or `PayPal <https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A9ZS7PKKRM3S8>`__ and have your logo displayed in here and psutil `doc <https://psutil.readthedocs.io>`__. @@ -499,14 +499,3 @@ Portings - C: https://github.com/hamon-in/cpslib - Rust: https://github.com/rust-psutil/rust-psutil - Nim: https://github.com/johnscillieri/psutil-nim - -Security -======== - -To report a security vulnerability, please use the `Tidelift security -contact`_. Tidelift will coordinate the fix and disclosure. - -.. _`Giampaolo Rodola`: https://gmpy.dev/about -.. _`donation`: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A9ZS7PKKRM3S8 -.. _Tidelift security contact: https://tidelift.com/security -.. _Tidelift Subscription: https://tidelift.com/subscription/pkg/pypi-psutil?utm_source=pypi-psutil&utm_medium=referral&utm_campaign=readme diff --git a/psutil/tests/test_process.py b/psutil/tests/test_process.py index 0ec2ead8..dfe88547 100755 --- a/psutil/tests/test_process.py +++ b/psutil/tests/test_process.py @@ -718,6 +718,12 @@ class TestProcess(PsutilTestCase): if NETBSD or OPENBSD or AIX: self.assertEqual(p.cmdline()[0], PYTHON_EXE) else: + if MACOS and CI_TESTING: + pyexe = p.cmdline()[0] + if pyexe != PYTHON_EXE: + self.assertEqual(' '.join(p.cmdline()[1:]), + ' '.join(cmdline[1:])) + return self.assertEqual(' '.join(p.cmdline()), ' '.join(cmdline)) @unittest.skipIf(PYPY, "broken on PYPY") diff --git a/psutil/tests/test_testutils.py b/psutil/tests/test_testutils.py index 31ac4dee..09adbdb1 100755 --- a/psutil/tests/test_testutils.py +++ b/psutil/tests/test_testutils.py @@ -350,6 +350,7 @@ class TestNetUtils(PsutilTestCase): @serialrun class TestMemLeakClass(TestMemoryLeak): + @retry_on_failure() def test_times(self): def fun(): cnt['cnt'] += 1 |