@@ -6,30 +6,29 @@ from path import Path
66# Whether we are running in onefile or dir mode
77onefile_mode = True
88if len (sys .argv ) == 3 :
9- print (sys .argv [2 ])
109 if sys .argv [2 ] == 'onefile' :
1110 onefile_mode = True
1211 elif sys .argv [2 ] == 'dir' :
1312 onefile_mode = False
1413
1514block_cipher = None
16- print (HOMEPATH )
17- print (sys .platform )
1815if sys .platform == 'linux' :
1916 occt_dir = Path (sys .prefix ) + os .path .sep + 'share' + os .path .sep + 'opencascade'
2017 ocp_path = (os .path .join (HOMEPATH , 'OCP.cpython-38-x86_64-linux-gnu.so' ), '.' )
18+ lib_dir = (os .path .join (Path (sys .prefix ), 'lib' ), '.' )
2119elif sys .platform == 'darwin' :
2220 occt_dir = Path (sys .prefix ) + os .path .sep + 'Library' + os .path .sep + 'share' + os .path .sep + 'opencascade'
2321 ocp_path = (os .path .join (HOMEPATH , 'OCP.cpython-38-darwin.so' ), '.' )
22+ lib_dir = (os .path .join (Path (sys .prefix ), 'lib' ), '.' )
2423elif sys .platform == 'win32' :
25- occt_dir = Path (sys .prefix ) + os . path . sep + 'Library' + os . path . sep + 'share' + os . path . sep + 'opencascade'
24+ occt_dir = os . path . join ( Path (sys .prefix ), 'Library' , 'share' , 'opencascade' )
2625 ocp_path = (os .path .join (HOMEPATH , 'OCP.cp38-win_amd64.pyd' ), '.' )
26+ lib_dir = (os .path .join (Path (sys .prefix ), 'Lib' ), '.' )
2727
2828# Dynamically find all the modules in the cqcodecs directory
2929hidden_imports = []
3030file_list = glob .glob ('.' + os .path .sep + 'cqcodecs' + os .path .sep + 'cq_codec_*.py' )
3131for file_path in file_list :
32- print (file_path )
3332 file_name = file_path .split (os .path .sep )[- 1 ]
3433 module_name = file_name .replace (".py" , "" )
3534 hidden_imports .append ("cqcodecs." + module_name )
@@ -40,7 +39,7 @@ a = Analysis(['cq-cli.py'],
4039 ocp_path
4140 ],
4241 datas = [
43- ( os . path . join ( Path ( sys . prefix ), 'lib' ), '.' )
42+ lib_dir
4443 ],
4544 hiddenimports = hidden_imports ,
4645 hookspath = [],
0 commit comments