summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Forcier <jeff@bitprophet.org>2023-02-24 17:23:15 -0500
committerJeff Forcier <jeff@bitprophet.org>2023-02-24 17:23:15 -0500
commita78dd39c9ea2bd40892fa31e5fe542382f8e8410 (patch)
treecc75fcfc1d65b3bfd94b6e9439de20df66c9ce60
parent4ced4229b67d7e6e93e8e0ea0431d52075fbbaa3 (diff)
downloadparamiko-a78dd39c9ea2bd40892fa31e5fe542382f8e8410.tar.gz
s/os.path/pathlib/ in www sphinx conf
-rw-r--r--sites/www/conf.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/sites/www/conf.py b/sites/www/conf.py
index 00944871..e2341611 100644
--- a/sites/www/conf.py
+++ b/sites/www/conf.py
@@ -1,9 +1,10 @@
# Obtain shared config values
-import sys
+from pathlib import Path
import os
-from os.path import abspath, join, dirname
+import sys
-sys.path.append(abspath(join(dirname(__file__), "..")))
+updir = Path(__file__).parent.parent.resolve()
+sys.path.append(str(updir))
from shared_conf import *
# Releases changelog extension
@@ -13,10 +14,10 @@ releases_issue_uri = "https://github.com/paramiko/paramiko/issues/%s"
# Default is 'local' building, but reference the public docs site when building
# under RTD.
-target = join(dirname(__file__), "..", "docs", "_build")
+target = updir / "docs" / "_build"
if os.environ.get("READTHEDOCS") == "True":
target = "http://docs.paramiko.org/en/latest/"
-intersphinx_mapping["docs"] = (target, None)
+intersphinx_mapping["docs"] = (str(target), None)
# Sister-site links to API docs
html_theme_options["extra_nav_links"] = {