diff options
Diffstat (limited to 'pkgs/development/python-modules/glean-sdk/fix-spawned-process-environment.patch')
-rw-r--r-- | pkgs/development/python-modules/glean-sdk/fix-spawned-process-environment.patch | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/glean-sdk/fix-spawned-process-environment.patch b/pkgs/development/python-modules/glean-sdk/fix-spawned-process-environment.patch new file mode 100644 index 00000000000..f9a7b2723eb --- /dev/null +++ b/pkgs/development/python-modules/glean-sdk/fix-spawned-process-environment.patch @@ -0,0 +1,20 @@ +diff --git a/glean-core/python/glean/_process_dispatcher.py b/glean-core/python/glean/_process_dispatcher.py +index 33a8b12796..a39b54a917 100644 +--- a/glean-core/python/glean/_process_dispatcher.py ++++ b/glean-core/python/glean/_process_dispatcher.py +@@ -120,8 +120,14 @@ def dispatch(cls, func, args) -> Union[_SyncWorkWrapper, subprocess.Popen]: + Path(".coveragerc").absolute() + ) + ++ # Explicitly pass the contents of `sys.path` as `PYTHONPATH` to the ++ # subprocess so that there aren't any module search path ++ # differences. ++ python_path = ":".join(sys.path)[1:] ++ + p = subprocess.Popen( +- [sys.executable, _process_dispatcher_helper.__file__, payload] ++ [sys.executable, _process_dispatcher_helper.__file__, payload], ++ env={"PYTHONPATH": python_path}, + ) + + cls._last_process = p |