diff --git a/Khoj.spec b/Khoj.spec index 3bee99b8..eae5be1c 100644 --- a/Khoj.spec +++ b/Khoj.spec @@ -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)