[Commented On] D10685: packaging: move documentation HTML building to own function
baymax (Baymax, Your Personal Patch-care Companion)
phabricator at mercurial-scm.org
Fri May 7 15:32:03 UTC 2021
baymax added a comment.
baymax updated this revision to Diff 27756.
✅ refresh by Heptapod after a successful CI run (🐙 💚)
REPOSITORY
rHG Mercurial
CHANGES SINCE LAST UPDATE
https://phab.mercurial-scm.org/D10685?vs=27727&id=27756
BRANCH
default
CHANGES SINCE LAST ACTION
https://phab.mercurial-scm.org/D10685/new/
REVISION DETAIL
https://phab.mercurial-scm.org/D10685
AFFECTED FILES
contrib/packaging/hgpackaging/pyoxidizer.py
CHANGE DETAILS
diff --git a/contrib/packaging/hgpackaging/pyoxidizer.py b/contrib/packaging/hgpackaging/pyoxidizer.py
--- a/contrib/packaging/hgpackaging/pyoxidizer.py
+++ b/contrib/packaging/hgpackaging/pyoxidizer.py
@@ -53,6 +53,21 @@
]
+def build_docs_html(source_dir: pathlib.Path):
+ """Ensures HTML documentation is built.
+
+ This will fail if docutils isn't available.
+
+ (The HTML docs aren't built as part of `pip install` so we need to build them
+ out of band.)
+ """
+ subprocess.run(
+ [sys.executable, str(source_dir / "setup.py"), "build_doc", "--html"],
+ cwd=str(source_dir),
+ check=True,
+ )
+
+
def run_pyoxidizer(
source_dir: pathlib.Path,
build_dir: pathlib.Path,
@@ -113,14 +128,7 @@
# is taught to use the importlib APIs for reading resources.
process_install_rules(STAGING_RULES_APP, build_dir, out_dir)
- # We also need to run setup.py build_doc to produce html files,
- # as they aren't built as part of ``pip install``.
- # This will fail if docutils isn't installed.
- subprocess.run(
- [sys.executable, str(source_dir / "setup.py"), "build_doc", "--html"],
- cwd=str(source_dir),
- check=True,
- )
+ build_docs_html(source_dir)
if "windows" in target_triple:
process_install_rules(STAGING_RULES_WINDOWS, source_dir, out_dir)
To: indygreg, #hg-reviewers
Cc: mercurial-patches
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial-patches/attachments/20210507/ea7cba97/attachment-0002.html>
More information about the Mercurial-patches
mailing list