[Request] [+- ] D10681: pyoxidizer: simplify targets
indygreg (Gregory Szorc)
phabricator at mercurial-scm.org
Fri May 7 00:01:46 UTC 2021
indygreg created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.
REVISION SUMMARY
The split targets existed to enable the use of a non-default
distribution flavor on Windows. Modern versions of PyOxidizer
use the "standalone_dynamic" distribution flavor by default.
So our split brain workaround is no longer needed.
Here, we unify the targets. We also remove an unreferenced
target function to create a resources file.
REPOSITORY
rHG Mercurial
BRANCH
default
REVISION DETAIL
https://phab.mercurial-scm.org/D10681
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
@@ -10,9 +10,6 @@
def make_distribution():
return default_python_distribution(python_version = "3.8")
-def make_distribution_windows():
- return default_python_distribution(flavor = "standalone_dynamic")
-
def resource_callback(policy, resource):
if not IS_WINDOWS:
resource.add_location = "in-memory"
@@ -83,26 +80,8 @@
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)
-
-register_target("exe_posix", make_exe, depends = ["distribution_posix"])
-register_target("exe_windows", make_exe, depends = ["distribution_windows"])
-
-register_target(
- "app_posix",
- make_manifest,
- depends = ["distribution_posix", "exe_posix"],
- default = "windows" not in BUILD_TARGET_TRIPLE,
-)
-register_target(
- "app_windows",
- make_manifest,
- depends = ["distribution_windows", "exe_windows"],
- default = "windows" in BUILD_TARGET_TRIPLE,
-)
+register_target("distribution", make_distribution)
+register_target("exe", make_exe, depends = ["distribution"])
+register_target("app", make_manifest, depends = ["distribution", "exe"], default = True)
resolve_targets()
To: indygreg, #hg-reviewers
Cc: mercurial-patches, mercurial-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mercurial-scm.org/pipermail/mercurial-patches/attachments/20210507/de5350ab/attachment.html>
More information about the Mercurial-patches
mailing list