Skip to content

Commit 8b27a29

Browse files
committed
Only use sphinx-build-compatibility on Read the Docs
1 parent cb3d5ea commit 8b27a29

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

docs/conf.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
# https://www.sphinx-doc.org/en/master/usage/configuration.html
66
from __future__ import annotations
77

8+
import os
89
import sys
910
from pathlib import Path
1011

@@ -39,9 +40,10 @@
3940
"sphinx.ext.autodoc",
4041
"sphinx.ext.viewcode",
4142
"sphinx.ext.intersphinx",
42-
"sphinx_build_compatibility.extension",
4343
"sphinx_copybutton",
4444
]
45+
if os.environ.get("READTHEDOCS") == "True":
46+
extensions.append("sphinx_build_compatibility.extension")
4547

4648
# List of patterns, relative to source directory, that match files and
4749
# directories to ignore when looking for source files.

0 commit comments

Comments
 (0)