diff --git a/assets/hooks/hook-rt-utils.py b/assets/hooks/hook-rt-utils.py new file mode 100644 index 0000000..fb896c1 --- /dev/null +++ b/assets/hooks/hook-rt-utils.py @@ -0,0 +1,7 @@ +from PyInstaller.utils.hooks import collect_submodules +from PyInstaller.utils.hooks import collect_data_files, copy_metadata + +hiddenimports = collect_submodules("rt_utils") + +datas = copy_metadata("rt_utils") +datas += collect_data_files("rt_utils") diff --git a/assets/main.spec b/assets/main.spec index 9d36cd3..27ca77d 100644 --- a/assets/main.spec +++ b/assets/main.spec @@ -20,7 +20,7 @@ print("PLATFORM:", sys.platform) # fix hidden imports hidden_imports = loadtxt(cwd + "/assets/requirements.txt", comments="#", delimiter=",", unpack=False, dtype=str) hidden_imports = [x.split("=")[0] for x in hidden_imports] + ["medpy", "ants", "sklearn", "scikit-learn", - "statsmodels", "gevent", "distutils", "PySide6", "gdown", "raidionicsrads", "raidionicsseg"] + "statsmodels", "gevent", "distutils", "PySide6", "gdown", "rt_utils", "raidionicsrads", "raidionicsseg"] hidden_imports = [x.lower() for x in hidden_imports] # copy dependencies and images, remove if folder already exists diff --git a/assets/main_arm.spec b/assets/main_arm.spec index a7a9bac..3a1ae80 100644 --- a/assets/main_arm.spec +++ b/assets/main_arm.spec @@ -19,7 +19,7 @@ print("PLATFORM:", sys.platform) # fix hidden imports hidden_imports = loadtxt(cwd + "/assets/requirements.txt", comments="#", delimiter=",", unpack=False, dtype=str) hidden_imports = [x.split("=")[0] for x in hidden_imports] + ["medpy", "sklearn", "scikit-learn", - "statsmodels", "gevent", "distutils", "PySide6", "gdown", "raidionicsrads", "raidionicsseg"] + "statsmodels", "gevent", "distutils", "PySide6", "gdown", "rt_utils", "raidionicsrads", "raidionicsseg"] hidden_imports = [x.lower() for x in hidden_imports] # copy dependencies and images, remove if folder already exists