Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit7a9bca9

Browse files
authored
Remove use of thesed command (#272)
1 parentc341248 commit7a9bca9

File tree

1 file changed

+6
-36
lines changed

1 file changed

+6
-36
lines changed

‎build_docs.py

Lines changed: 6 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -646,21 +646,6 @@ def build(self):
646646
"-D gettext_compact=0",
647647
"-D translation_progress_classes=1",
648648
))
649-
ifself.language.tag=="ja":
650-
# Since luatex doesn't support \ufffd, replace \ufffd with '?'.
651-
# https://gist.github.com/zr-tex8r/e0931df922f38fbb67634f05dfdaf66b
652-
# Luatex already fixed this issue, so we can remove this once Texlive
653-
# is updated.
654-
# (https://github.com/TeX-Live/luatex/commit/af5faf1)
655-
subprocess.check_output(
656-
"sed -i s/\N{REPLACEMENT CHARACTER}/?/g "
657-
f"{locale_dirs}/ja/LC_MESSAGES/**/*.po",
658-
shell=True,
659-
)
660-
subprocess.check_output(
661-
f"sed -i s/\N{REPLACEMENT CHARACTER}/?/g{self.checkout}/Doc/**/*.rst",
662-
shell=True,
663-
)
664649

665650
ifself.version.status=="EOL":
666651
sphinxopts.append("-D html_context.outdated=1")
@@ -687,27 +672,12 @@ def build(self):
687672
f"-D ogp_site_url={site_url}",
688673
)
689674

690-
defis_gnu_sed()->bool:
691-
"""Check if we are using GNU sed."""
692-
try:
693-
subprocess.run(
694-
["sed","--version"],
695-
stdout=subprocess.DEVNULL,
696-
stderr=subprocess.DEVNULL,
697-
check=True,
698-
)
699-
returnTrue
700-
exceptsubprocess.CalledProcessError:
701-
returnFalse
702-
exceptFileNotFoundError:
703-
returnFalse
704-
705-
# Disable CPython switchers, we handle them now:
706-
run(
707-
["sed","-i"]
708-
+ ([]ifis_gnu_sed()else [""])
709-
+ ["s/ *-A switchers=1//",self.checkout/"Doc"/"Makefile"]
710-
)
675+
ifself.version.as_tuple()< (3,8):
676+
# Disable CPython switchers, we handle them now:
677+
text= (self.checkout/"Doc"/"Makefile").read_text(encoding="utf-8")
678+
text=text.replace(" -A switchers=1","")
679+
(self.checkout/"Doc"/"Makefile").write_text(text,encoding="utf-8")
680+
711681
self.versions.setup_indexsidebar(
712682
self.version,
713683
self.checkout/"Doc"/"tools"/"templates"/"indexsidebar.html",

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp