Patchwork D11734: pyoxidizer: use in-memory resources on non-Windows platforms

login
register
mail settings
Submitter phabricator
Date Nov. 3, 2021, 9:17 p.m.
Message ID <differential-rev-PHID-DREV-raiirlx36qfdjkj2newy-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/50059/
State Superseded
Headers show

Comments

phabricator - Nov. 3, 2021, 9:17 p.m.
spectral created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REVISION SUMMARY
  In-memory resources were disabled for macOS in 7bc1beed <https://phab.mercurial-scm.org/rHG7bc1beedd71882c86d3236639fcd3220b2bac734>, and for all platforms
  in c900d962 <https://phab.mercurial-scm.org/rHGc900d962e38bd59c39489f6ac9672c9af0b85b77>. Unfortunately this made it so that we were no longer producing
  standalone binaries on these platforms, and would have to ship the .py and .pyc
  files alongside the pyoxidized binary.
  
  These changes are no longer necessary after f6b04591 <https://phab.mercurial-scm.org/rHGf6b045910d82d55b13a5212d10379a31f6047688>, which disabled pep517 and
  solved the issue we were encountering.

REPOSITORY
  rHG Mercurial

BRANCH
  default

REVISION DETAIL
  https://phab.mercurial-scm.org/D11734

AFFECTED FILES
  rust/hgcli/pyoxidizer.bzl

CHANGE DETAILS




To: spectral, #hg-reviewers
Cc: mercurial-patches, mercurial-devel

Patch

diff --git a/rust/hgcli/pyoxidizer.bzl b/rust/hgcli/pyoxidizer.bzl
--- a/rust/hgcli/pyoxidizer.bzl
+++ b/rust/hgcli/pyoxidizer.bzl
@@ -34,7 +34,10 @@ 
 
 IS_WINDOWS = "windows" in BUILD_TARGET_TRIPLE
 
-USE_IN_MEMORY_RESOURCES = False
+# Use in-memory resources for all resources. If false, most of the Python
+# stdlib will be in memory, but other things such as Mercurial itself will not
+# be. See the comment in resource_callback, below.
+USE_IN_MEMORY_RESOURCES = not IS_WINDOWS
 
 # Code to run in Python interpreter.
 RUN_CODE = """