changeset 45831:f14c33b2e497

pyoxidizer: default to one-file binary on non-Windows platforms Windows has some extra constraints that require a multi-file install, but we expect folks to use an MSI or similar installer there so it's less of a big deal. Differential Revision: https://phab.mercurial-scm.org/D9289
author Augie Fackler <augie@google.com>
date Tue, 03 Nov 2020 16:25:33 -0500
parents c102b704edb5
children 867385f45559
files rust/hgcli/pyoxidizer.bzl
diffstat 1 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/rust/hgcli/pyoxidizer.bzl	Fri Nov 06 13:58:59 2020 -0800
+++ b/rust/hgcli/pyoxidizer.bzl	Tue Nov 03 16:25:33 2020 -0500
@@ -14,6 +14,9 @@
     return default_python_distribution(flavor = "standalone_dynamic")
 
 def resource_callback(policy, resource):
+    if not IS_WINDOWS:
+        resource.add_location = "in-memory"
+        return
     # We use a custom resource routing policy to influence where things are loaded
     # from.
     #
@@ -40,7 +43,8 @@
     # extensions.
     packaging_policy.extension_module_filter = "all"
     packaging_policy.resources_location = "in-memory"
-    packaging_policy.resources_location_fallback = "filesystem-relative:lib"
+    if IS_WINDOWS:
+        packaging_policy.resources_location_fallback = "filesystem-relative:lib"
     packaging_policy.register_resource_callback(resource_callback)
 
     config = dist.make_python_interpreter_config()