File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 33
44block_cipher = None
55
6- script_path = os .path .join (workpath , 'ndrop-script.py' )
6+ app_name = 'ndrop'
7+ pkg_path = 'ndrop'
8+
9+ script_path = os .path .join (workpath , f'{ app_name } -script.py' )
710
811with open (script_path , 'wt' ) as f :
9- f .write ('import ndrop .__main__\n ndrop .__main__.run()' )
12+ f .write (f 'import { pkg_path } .__main__\n { pkg_path } .__main__.run()' )
1013
1114a = Analysis ([script_path ],
12- pathex = [workpath ],
15+ pathex = ['.' ],
1316 binaries = [],
1417 datas = [],
1518 hiddenimports = ['pkg_resources.py2_warn' ],
@@ -24,35 +27,34 @@ a = Analysis([script_path],
2427pyz = PYZ (a .pure , a .zipped_data ,
2528 cipher = block_cipher )
2629
27- # one folder
28- # exe = EXE(pyz,
29- # a.scripts,
30- # [],
31- # exclude_binaries=True,
32- # name='ndrop',
33- # debug=False,
34- # bootloader_ignore_signals=False,
35- # strip=False,
36- # upx=True,
37- # console=True )
38- # coll = COLLECT(exe,
39- # a.binaries,
40- # a.zipfiles,
41- # a.datas,
42- # strip=False,
43- # upx=True,
44- # upx_exclude=[],
45- # name='ndrop')
46-
47- # onefile
48- exe = EXE (pyz ,
49- a .scripts ,
50- a .binaries ,
51- a .zipfiles ,
52- a .datas ,
53- name = 'ndrop' ,
54- debug = False ,
55- strip = False ,
56- upx = True ,
57- runtime_tmpdir = None ,
58- console = True )
30+ if False : # one folder
31+ exe = EXE (pyz ,
32+ a .scripts ,
33+ [],
34+ exclude_binaries = True ,
35+ name = app_name ,
36+ debug = False ,
37+ bootloader_ignore_signals = False ,
38+ strip = False ,
39+ upx = True ,
40+ console = True )
41+ coll = COLLECT (exe ,
42+ a .binaries ,
43+ a .zipfiles ,
44+ a .datas ,
45+ strip = False ,
46+ upx = True ,
47+ upx_exclude = [],
48+ name = app_name )
49+ else : # onefile
50+ exe = EXE (pyz ,
51+ a .scripts ,
52+ a .binaries ,
53+ a .zipfiles ,
54+ a .datas ,
55+ name = app_name ,
56+ debug = False ,
57+ strip = False ,
58+ upx = True ,
59+ runtime_tmpdir = None ,
60+ console = True )
Original file line number Diff line number Diff line change 11
22rmdir build /s /q
3- rmdir dist\ndrop /s /q
3+ del dist\ndrop.exe /q
44pyinstaller ndrop.spec
55
66dist\ndrop.exe
You can’t perform that action at this time.
0 commit comments