Added pyinstaller hook for stix2 module

This commit is contained in:
Shay Nehmad 2020-04-16 23:22:58 +03:00
parent 7ef3c3b0a8
commit fb345845fe
3 changed files with 8 additions and 1 deletions

View File

@ -19,7 +19,7 @@ def main():
a = Analysis(['cc/main.py'],
pathex=['..'],
hiddenimports=get_hidden_imports(),
hookspath=None,
hookspath=[os.path.join(".", "pyinstaller_hooks")],
runtime_hooks=None,
binaries=None,
datas=added_datas,

View File

@ -0,0 +1,7 @@
# Workaround for packaging Monkey Island using PyInstaller. See https://github.com/oasis-open/cti-python-stix2/issues/218
import os
from PyInstaller.utils.hooks import get_module_file_attribute
stix2_dir = os.path.dirname(get_module_file_attribute('stix2'))
datas = [(stix2_dir, 'stix2')]