changeset 44888:118f067f6bd1

pyoxidizer: formatting bazel definitions This meets the Bazel style guide: https://docs.bazel.build/versions/master/skylark/bzl-style.html and was mostly done automatically with buildifier. Differential Revision: https://phab.mercurial-scm.org/D8521
author Rodrigo Damazio Bovendorp <rdamazio@google.com>
date Tue, 12 May 2020 13:06:34 -0700
parents 62435a5b46fe
children 3b7aabd02e11
files rust/hgcli/pyoxidizer.bzl
diffstat 1 files changed, 3 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/rust/hgcli/pyoxidizer.bzl	Mon May 11 09:07:31 2020 -0700
+++ b/rust/hgcli/pyoxidizer.bzl	Tue May 12 13:06:34 2020 -0700
@@ -3,19 +3,16 @@
 # Code to run in Python interpreter.
 RUN_CODE = "import hgdemandimport; hgdemandimport.enable(); from mercurial import dispatch; dispatch.run()"
 
-
 set_build_path(ROOT + "/build/pyoxidizer")
 
-
 def make_distribution():
     return default_python_distribution()
 
-
 def make_distribution_windows():
-    return default_python_distribution(flavor="standalone_dynamic")
-
+    return default_python_distribution(flavor = "standalone_dynamic")
 
 def make_exe(dist):
+    """Builds a Rust-wrapped Mercurial binary."""
     config = PythonInterpreterConfig(
         raw_allocator = "system",
         run_eval = RUN_CODE,
@@ -58,23 +55,20 @@
     # On Windows, we install extra packages for convenience.
     if "windows" in BUILD_TARGET_TRIPLE:
         exe.add_python_resources(
-            dist.pip_install(["-r", ROOT + "/contrib/packaging/requirements_win32.txt"])
+            dist.pip_install(["-r", ROOT + "/contrib/packaging/requirements_win32.txt"]),
         )
 
     return exe
 
-
 def make_manifest(dist, exe):
     m = FileManifest()
     m.add_python_resource(".", exe)
 
     return m
 
-
 def make_embedded_resources(exe):
     return exe.to_embedded_resources()
 
-
 register_target("distribution_posix", make_distribution)
 register_target("distribution_windows", make_distribution_windows)