# HG changeset patch # User Augie Fackler # Date 2020-11-03 21:25:33 # Node ID f14c33b2e497ab3938bc3be576a36a23b800e4d9 # Parent c102b704edb5191ed15ed4b02b625a888b8be816 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 diff --git a/rust/hgcli/pyoxidizer.bzl b/rust/hgcli/pyoxidizer.bzl --- a/rust/hgcli/pyoxidizer.bzl +++ b/rust/hgcli/pyoxidizer.bzl @@ -14,6 +14,9 @@ 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" + return # We use a custom resource routing policy to influence where things are loaded # from. # @@ -40,7 +43,8 @@ def make_exe(dist): # 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()