]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-145177: Add make-dependencies command to emscripten build script (#146158)
authorHood Chatham <roberthoodchatham@gmail.com>
Thu, 19 Mar 2026 21:40:01 +0000 (22:40 +0100)
committerGitHub <noreply@github.com>
Thu, 19 Mar 2026 21:40:01 +0000 (05:40 +0800)
Adds a standalone target for building all dependencies so that the buildbot
script is independent of a specific dependency list.

Platforms/emscripten/__main__.py

index a7c52c2d59f10d1a783e164e61e024085d0f711a..98e5731be96a5363451cebf22db676a40cde5316 100644 (file)
@@ -413,6 +413,11 @@ def make_mpdec(context, working_dir):
     write_library_config(prefix, "mpdec", mpdec_config, context.quiet)
 
 
+def make_dependencies(context):
+    make_emscripten_libffi(context)
+    make_mpdec(context)
+
+
 def calculate_node_path():
     node_version = os.environ.get("PYTHON_NODE_VERSION", None)
     if node_version is None:
@@ -665,6 +670,11 @@ def main():
         help="Clone libffi repo, configure and build it for emscripten",
     )
 
+    make_dependencies_cmd = subcommands.add_parser(
+        "make-dependencies",
+        help="Build all static library dependencies",
+    )
+
     make_build = subcommands.add_parser(
         "make-build-python", help="Run `make` for the build Python"
     )
@@ -714,6 +724,7 @@ def main():
         configure_build,
         make_libffi_cmd,
         make_mpdec_cmd,
+        make_dependencies_cmd,
         make_build,
         configure_host,
         make_host,
@@ -781,6 +792,7 @@ def main():
         "install-emscripten": install_emscripten,
         "make-libffi": make_emscripten_libffi,
         "make-mpdec": make_mpdec,
+        "make-dependencies": make_dependencies,
         "configure-build-python": configure_build_python,
         "make-build-python": make_build_python,
         "configure-host": configure_emscripten_python,