Skip to content

Commit f7c2c63

Browse files
committed
replace various
1 parent eefa0a5 commit f7c2c63

File tree

2 files changed

+38
-36
lines changed

2 files changed

+38
-36
lines changed

ndrop.spec

Lines changed: 37 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,16 @@
33

44
block_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

811
with open(script_path, 'wt') as f:
9-
f.write('import ndrop.__main__\nndrop.__main__.run()')
12+
f.write(f'import {pkg_path}.__main__\n{pkg_path}.__main__.run()')
1013

1114
a = 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],
2427
pyz = 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 )

py2exe.cmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11

22
rmdir build /s /q
3-
rmdir dist\ndrop /s /q
3+
del dist\ndrop.exe /q
44
pyinstaller ndrop.spec
55

66
dist\ndrop.exe

0 commit comments

Comments
 (0)