From d7ff99780e9649ab3314f4444218cf148563d3ae Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Wed, 4 Oct 2023 13:17:03 +1000 Subject: [PATCH] Improve Python Protobuf speed upb was being included in the bundle, but not found at run time due to src files being embedded in the binary. --- build/runner/src/bundle/folder.rs | 10 ++++++++++ qt/bundle/pyoxidizer.bzl | 1 + 2 files changed, 11 insertions(+) diff --git a/build/runner/src/bundle/folder.rs b/build/runner/src/bundle/folder.rs index 7d40d06aaf6..cdbfd21e8e4 100644 --- a/build/runner/src/bundle/folder.rs +++ b/build/runner/src/bundle/folder.rs @@ -143,4 +143,14 @@ fn copy_binary_and_pylibs(folder_root: &Utf8Path) { &with_slash(unix_path(&extra_files)), &with_slash(unix_path(folder_root)), ])); + let google_py = if cfg!(windows) { + folder_root.join("../pyenv/lib/site-packages/google") + } else { + folder_root.join("../pyenv/lib/python3.9/site-packages/google") + }; + run_command(Command::new("rsync").args([ + "-a", + &unix_path(&google_py), + &with_slash(unix_path(&folder_root.join("lib"))), + ])); } diff --git a/qt/bundle/pyoxidizer.bzl b/qt/bundle/pyoxidizer.bzl index 57721ef7772..9bf48dc5a71 100644 --- a/qt/bundle/pyoxidizer.bzl +++ b/qt/bundle/pyoxidizer.bzl @@ -16,6 +16,7 @@ excluded_source_prefixes = [ "PyQt6", "pip", "setuptools", + "google" ] excluded_resource_suffixes = [