[Request] [+ ] D8521: pyoxidizer: formatting bazel definitions
rdamazio (Rodrigo Damazio Bovendorp)
phabricator at mercurial-scm.org
Tue May 12 20:09:53 UTC 2020
rdamazio created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.
REVISION SUMMARY
This meets the Bazel style guide:
https://docs.bazel.build/versions/master/skylark/bzl-style.html
and was mostly done automatically with buildifier.
REPOSITORY
rHG Mercurial
BRANCH
default
REVISION DETAIL
https://phab.mercurial-scm.org/D8521
AFFECTED FILES
rust/hgcli/pyoxidizer.bzl
CHANGE DETAILS
diff --git a/rust/hgcli/pyoxidizer.bzl b/rust/hgcli/pyoxidizer.bzl
--- a/rust/hgcli/pyoxidizer.bzl
+++ b/rust/hgcli/pyoxidizer.bzl
@@ -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)
To: rdamazio, #hg-reviewers
Cc: mercurial-patches, mercurial-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mercurial-scm.org/pipermail/mercurial-patches/attachments/20200512/21661369/attachment.html>
More information about the Mercurial-patches
mailing list