From 9a19f0ed16044ee467ab511be3b132d42ed1cae2 Mon Sep 17 00:00:00 2001 From: Alex Willmer Date: Tue, 23 Nov 2021 23:49:00 +0000 Subject: [PATCH] mitogen.master: Fix stdlib discovery when sys.prefix contains symlinks This can be he case when Python has been installed with Homebrew. --- mitogen/master.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mitogen/master.py b/mitogen/master.py index e54795cb..806120d6 100644 --- a/mitogen/master.py +++ b/mitogen/master.py @@ -108,7 +108,7 @@ def _stdlib_paths(): ] prefixes = (getattr(sys, a, None) for a in attr_candidates) version = 'python%s.%s' % sys.version_info[0:2] - s = set(os.path.abspath(os.path.join(p, 'lib', version)) + s = set(os.path.realpath(os.path.join(p, 'lib', version)) for p in prefixes if p is not None) # When running 'unit2 tests/module_finder_test.py' in a Py2 venv on Ubuntu