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

Remove use of thesed command#272

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
AA-Turner merged 2 commits intomainfromsed
Apr 12, 2025
Merged
Changes fromall 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
42 changes: 6 additions & 36 deletionsbuild_docs.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -646,21 +646,6 @@ def build(self):
"-D gettext_compact=0",
"-D translation_progress_classes=1",
))
if self.language.tag == "ja":
# Since luatex doesn't support \ufffd, replace \ufffd with '?'.
# https://gist.github.com/zr-tex8r/e0931df922f38fbb67634f05dfdaf66b
# Luatex already fixed this issue, so we can remove this once Texlive
# is updated.
# (https://github.com/TeX-Live/luatex/commit/af5faf1)
subprocess.check_output(
"sed -i s/\N{REPLACEMENT CHARACTER}/?/g "
f"{locale_dirs}/ja/LC_MESSAGES/**/*.po",
shell=True,
)
subprocess.check_output(
f"sed -i s/\N{REPLACEMENT CHARACTER}/?/g {self.checkout}/Doc/**/*.rst",
shell=True,
)

if self.version.status == "EOL":
sphinxopts.append("-D html_context.outdated=1")
Expand All@@ -687,27 +672,12 @@ def build(self):
f"-D ogp_site_url={site_url}",
)

def is_gnu_sed() -> bool:
"""Check if we are using GNU sed."""
try:
subprocess.run(
["sed", "--version"],
stdout=subprocess.DEVNULL,
stderr=subprocess.DEVNULL,
check=True,
)
return True
except subprocess.CalledProcessError:
return False
except FileNotFoundError:
return False

# Disable CPython switchers, we handle them now:
run(
["sed", "-i"]
+ ([] if is_gnu_sed() else [""])
+ ["s/ *-A switchers=1//", self.checkout / "Doc" / "Makefile"]
)
if self.version.as_tuple() < (3, 8):
# Disable CPython switchers, we handle them now:
text = (self.checkout / "Doc" / "Makefile").read_text(encoding="utf-8")
text = text.replace(" -A switchers=1", "")
(self.checkout / "Doc" / "Makefile").write_text(text, encoding="utf-8")

self.versions.setup_indexsidebar(
self.version,
self.checkout / "Doc" / "tools" / "templates" / "indexsidebar.html",
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp