From a3ad928f29c5c0f01cae34855951d96201cf3336 Mon Sep 17 00:00:00 2001 From: danielsagi Date: Fri, 4 Dec 2020 13:43:37 +0200 Subject: [PATCH] Bug Fix: Pyinstaller prettytable error (#419) * added specific problematic hooks folder for when compiling with pyinstaller. added a fix for prettytable import * fixed typo * lint fix --- pyinstaller_hooks/hook-prettytable.py | 3 +++ setup.py | 2 ++ 2 files changed, 5 insertions(+) create mode 100644 pyinstaller_hooks/hook-prettytable.py diff --git a/pyinstaller_hooks/hook-prettytable.py b/pyinstaller_hooks/hook-prettytable.py new file mode 100644 index 0000000..8873adb --- /dev/null +++ b/pyinstaller_hooks/hook-prettytable.py @@ -0,0 +1,3 @@ +from PyInstaller.utils.hooks import collect_all + +datas, binaries, hiddenimports = collect_all("prettytable") diff --git a/setup.py b/setup.py index a56a8aa..b59a753 100644 --- a/setup.py +++ b/setup.py @@ -41,6 +41,8 @@ class PyInstallerCommand(Command): cfg.read("setup.cfg") command = [ "pyinstaller", + "--additional-hooks-dir", + "pyinstaller_hooks", "--clean", "--onefile", "--name",