@@ -15,7 +15,7 @@ def main():
15
15
env_dir = os .path .abspath ('./wpull_env/' )
16
16
is_windows = platform .system () == 'Windows'
17
17
env_bin_dir = 'Scripts' if is_windows else 'bin'
18
- env_python_exe = 'python'
18
+ env_python_exe = 'python.exe' if is_windows else 'python '
19
19
exe_name = 'wpull'
20
20
final_exe_name = 'wpull.exe' if is_windows else 'wpull'
21
21
@@ -44,14 +44,15 @@ def run_env(args):
44
44
45
45
print ('Check for PyInstaller.' )
46
46
try :
47
- run_env_py (['PyInstaller.main' , '--version' ])
48
- except subprocess .CalledProcessError as error :
49
- print ('Returned code' , error .returncode )
47
+ run_env (['pyinstaller' , '--version' ])
48
+ except (FileNotFoundError , subprocess .CalledProcessError ) as error :
49
+ if hasattr (error , 'returncode' ):
50
+ print ('Returned code' , error .returncode )
50
51
51
52
print ('Install PyInstaller.' )
52
53
run_env_py ([
53
54
'pip' , 'install' ,
54
- 'PyInstaller' ,
55
+ 'PyInstaller==3.1.1 ' ,
55
56
])
56
57
57
58
print ('Install packages.' )
@@ -65,7 +66,7 @@ def run_env(args):
65
66
66
67
print ('Build binary.' )
67
68
run_env (['pyi-makespec' ,
68
- os . path . join ( env_dir , env_bin_dir , 'wpull' ) ,
69
+ 'entry_point.py' ,
69
70
'--additional-hooks-dir' , 'hooks' ,
70
71
'--onefile' ,
71
72
'--name' , exe_name ,
0 commit comments