Skip to content

Provide a backup suffix for sed -i (in-place) option when on MacOS #177

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 15, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 8 additions & 6 deletions build_docs.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
import logging.handlers
from functools import total_ordering
from os import readlink
import platform
import re
import shlex
import shutil
Expand Down Expand Up @@ -745,13 +746,14 @@ def build(self):
sphinxbuild = self.venv / "bin" / "sphinx-build"
blurb = self.venv / "bin" / "blurb"
# Disable cpython switchers, we handle them now:

def is_mac():
return platform.system() == 'Darwin'

run(
[
"sed",
"-i",
"s/ *-A switchers=1//",
self.checkout / "Doc" / "Makefile",
]
["sed", "-i"]
+ ([""] if is_mac() else [])
+ ["s/ *-A switchers=1//", self.checkout / "Doc" / "Makefile"]
)
self.version.setup_indexsidebar(
self.versions,
Expand Down