--- a/rust/hgcli/pyoxidizer.bzl Tue Oct 12 14:12:41 2021 -0700
+++ b/rust/hgcli/pyoxidizer.bzl Fri Sep 17 15:02:01 2021 -0400
@@ -33,6 +33,7 @@
TIME_STAMP_SERVER_URL = VARS.get("TIME_STAMP_SERVER_URL", "http://timestamp.digicert.com")
IS_WINDOWS = "windows" in BUILD_TARGET_TRIPLE
+IS_MACOS = "darwin" in BUILD_TARGET_TRIPLE
# Code to run in Python interpreter.
RUN_CODE = """
@@ -69,7 +70,7 @@
return default_python_distribution(python_version = "3.9")
def resource_callback(policy, resource):
- if not IS_WINDOWS:
+ if not (IS_WINDOWS or IS_MACOS):
resource.add_location = "in-memory"
return
@@ -100,7 +101,7 @@
# extensions.
packaging_policy.extension_module_filter = "all"
packaging_policy.resources_location = "in-memory"
- if IS_WINDOWS:
+ if IS_WINDOWS or IS_MACOS:
packaging_policy.resources_location_fallback = "filesystem-relative:lib"
packaging_policy.register_resource_callback(resource_callback)