We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a6a666d commit 44a22a6Copy full SHA for 44a22a6
build_docs.py
@@ -657,10 +657,25 @@ def build(self):
657
f"-D ogp_site_url={site_url}",
658
)
659
660
+ def is_gnu_sed() -> bool:
661
+ """Check if we are using GNU sed."""
662
+ try:
663
+ subprocess.run(
664
+ ["sed", "--version"],
665
+ stdout=subprocess.DEVNULL,
666
+ stderr=subprocess.DEVNULL,
667
+ check=True,
668
+ )
669
+ return True
670
+ except subprocess.CalledProcessError:
671
+ return False
672
+ except FileNotFoundError:
673
674
+
675
# Disable CPython switchers, we handle them now:
676
run(
677
["sed", "-i"]
- + ([""] if sys.platform == "darwin" else [])
678
+ + ([] if is_gnu_sed() else [""])
679
+ ["s/ *-A switchers=1//", self.checkout / "Doc" / "Makefile"]
680
681
self.versions.setup_indexsidebar(
0 commit comments