mitogen.master: Fix stdlib discovery when sys.prefix contains symlinks

This can be he case when Python has been installed with Homebrew.
This commit is contained in:
Alex Willmer 2021-11-23 23:49:00 +00:00
parent cadd393cd7
commit 9a19f0ed16
1 changed files with 1 additions and 1 deletions

View File

@ -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