diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2020-02-12 12:32:52 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-12 12:32:52 (GMT) |
commit | ac6f4d2db703c0ff88e496bcb7b7fe55cf2ac458 (patch) | |
tree | 96534d89da1aefc65872977c4ac4078993b62a22 /Lib/pydoc.py | |
parent | efd878cdb46d9c7038d93fb36eb1ff7dc5baf9ec (diff) | |
download | cpython-ac6f4d2db703c0ff88e496bcb7b7fe55cf2ac458.zip cpython-ac6f4d2db703c0ff88e496bcb7b7fe55cf2ac458.tar.gz cpython-ac6f4d2db703c0ff88e496bcb7b7fe55cf2ac458.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>
(cherry picked from commit 4fac7ed43ebf1771a8fe86fdfe7b9991f3be78cd)
Co-authored-by: Victor Stinner <vstinner@python.org>
Diffstat (limited to 'Lib/pydoc.py')
-rw-r--r-- | Lib/pydoc.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/Lib/pydoc.py b/Lib/pydoc.py index 9a22e56..dc3377d 100644 --- a/Lib/pydoc.py +++ b/Lib/pydoc.py @@ -66,6 +66,7 @@ import pkgutil import platform import re import sys +import sysconfig import time import tokenize import urllib.parse @@ -392,9 +393,7 @@ class Doc: docmodule = docclass = docroutine = docother = docproperty = docdata = fail - def getdocloc(self, object, - basedir=os.path.join(sys.base_exec_prefix, "lib", - "python%d.%d" % sys.version_info[:2])): + def getdocloc(self, object, basedir=sysconfig.get_path('stdlib')): """Return the location of module docs or None""" try: |