diff options
author | Victor Stinner <vstinner@python.org> | 2020-02-12 12:02:29 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-12 12:02:29 (GMT) |
commit | 4fac7ed43ebf1771a8fe86fdfe7b9991f3be78cd (patch) | |
tree | 492868bf58bacf625bba43b28d1c9205890db609 /Lib/trace.py | |
parent | 8c579b1cc86053473eb052b76327279476740c9b (diff) | |
download | cpython-4fac7ed43ebf1771a8fe86fdfe7b9991f3be78cd.zip cpython-4fac7ed43ebf1771a8fe86fdfe7b9991f3be78cd.tar.gz cpython-4fac7ed43ebf1771a8fe86fdfe7b9991f3be78cd.tar.bz2 |
bpo-21016: pydoc and trace use sysconfig (GH-18476)
bpo-21016, bpo-1294959: The pydoc and trace modules now use the
sysconfig module to get the path to the Python standard library, to
support uncommon installation path like /usr/lib64/python3.9/ on
Fedora.
Co-Authored-By: Jan Matějek <jmatejek@suse.com>
Diffstat (limited to 'Lib/trace.py')
-rwxr-xr-x | Lib/trace.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/trace.py b/Lib/trace.py index 681c3f9..52047c3 100755 --- a/Lib/trace.py +++ b/Lib/trace.py @@ -52,6 +52,7 @@ __all__ = ['Trace', 'CoverageResults'] import linecache import os import sys +import sysconfig import token import tokenize import inspect @@ -660,9 +661,8 @@ def main(): opts = parser.parse_args() if opts.ignore_dir: - rel_path = 'lib', 'python{0.major}.{0.minor}'.format(sys.version_info) - _prefix = os.path.join(sys.base_prefix, *rel_path) - _exec_prefix = os.path.join(sys.base_exec_prefix, *rel_path) + _prefix = sysconfig.get_path("stdlib") + _exec_prefix = sysconfig.get_path("platstdlib") def parse_ignore_dir(s): s = os.path.expanduser(os.path.expandvars(s)) |