Skip to content

Commit

Permalink
Adding rt_utils hook for executable
Browse files Browse the repository at this point in the history
  • Loading branch information
dbouget committed Aug 18, 2023
1 parent 4544707 commit 67d92d5
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
7 changes: 7 additions & 0 deletions assets/hooks/hook-rt-utils.py
Original file line number Diff line number Diff line change
@@ -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")
2 changes: 1 addition & 1 deletion assets/main.spec
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion assets/main_arm.spec
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 67d92d5

Please sign in to comment.