Add h5py to hidden imports when running precise-all build

This commit is contained in:
Matthew D. Scholefield 2019-05-01 01:04:37 -05:00
parent d5441f4898
commit 695c0ebc27

View File

@ -10,6 +10,8 @@ script_name = '%%SCRIPT%%'
train_libs = %%TRAIN_LIBS%% train_libs = %%TRAIN_LIBS%%
strip = True strip = True
site_packages = '.venv/lib/python3.6/site-packages/' site_packages = '.venv/lib/python3.6/site-packages/'
hidden_imports = ['prettyparse', 'speechpy']
binaries = []
def recursive_glob(treeroot, pattern): def recursive_glob(treeroot, pattern):
@ -25,15 +27,14 @@ if train_libs:
(abspath(i), dirname(i.replace(site_packages, ''))) (abspath(i), dirname(i.replace(site_packages, '')))
for i in recursive_glob(site_packages + "tensorflow/", "*.so") for i in recursive_glob(site_packages + "tensorflow/", "*.so")
] ]
else: hidden_imports += ['h5py']
binaries = []
a = Analysis( a = Analysis(
[abspath('precise/scripts/{}.py'.format(script_name))], [abspath('precise/scripts/{}.py'.format(script_name))],
pathex=['.'], pathex=['.'],
binaries=binaries, binaries=binaries,
datas=[], datas=[],
hiddenimports=['prettyparse', 'speechpy'], hiddenimports=hidden_imports,
hookspath=[], hookspath=[],
runtime_hooks=[], runtime_hooks=[],
excludes=['PySide', 'PyQt4', 'PyQt5', 'matplotlib'], excludes=['PySide', 'PyQt4', 'PyQt5', 'matplotlib'],