Skip to content

Commit 1049d26

Browse files
committed
Only use sphinx-build-compatibility on Read the Docs
1 parent 7fe82c6 commit 1049d26

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

docs/conf.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
from __future__ import annotations
22

33
import datetime
4+
import os
45
import sys
56
from pathlib import Path
67

@@ -33,9 +34,10 @@
3334
extensions = [
3435
"sphinx.ext.autodoc",
3536
"sphinx.ext.extlinks",
36-
"sphinx_build_compatibility.extension",
3737
"sphinx_copybutton",
3838
]
39+
if os.environ.get("READTHEDOCS") == "True":
40+
extensions.append("sphinx_build_compatibility.extension")
3941

4042
# Add any paths that contain templates here, relative to this directory.
4143
templates_path = ["_templates"]

0 commit comments

Comments
 (0)