Fix path to remove shared libraries when packaging the Windows app

This commit is contained in:
Debanjum Singh Solanky 2022-08-20 20:29:33 +03:00
parent 7fe3e844d2
commit 450f6441e2

View file

@ -41,8 +41,9 @@ torch_lib_paths = {
}
a.datas = [entry for entry in a.datas if not entry[0] in torch_lib_paths]
a.datas = [entry for entry in a.datas if not 'torch/_C.cp' in entry[0]]
a.datas = [entry for entry in a.datas if not 'torch/_dl.cp' in entry[0]]
os_path_separator = '\\' if system() == 'Windows' else '/'
a.datas = [entry for entry in a.datas if not f'torch{os_path_separator}_C.cp' in entry[0]]
a.datas = [entry for entry in a.datas if not f'torch{os_path_separator}_dl.cp' in entry[0]]
pyz = PYZ(a.pure, a.zipped_data, cipher=block_cipher)