Skip to content

Commit 05ba4fc

Browse files
committed
Merge pull request #323 from stonebig/master
survive better to space
2 parents 57ea935 + 0694a21 commit 05ba4fc

File tree

1 file changed

+16
-16
lines changed

1 file changed

+16
-16
lines changed

make.py

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -344,9 +344,9 @@ def create_python_batch(self, name, script_name,
344344

345345
if command is None:
346346
if script_name.endswith('.pyw'):
347-
command = 'start %WINPYDIR%\pythonw.exe'
347+
command = 'start "%WINPYDIR%\pythonw.exe"'
348348
else:
349-
command = '%WINPYDIR%\python.exe'
349+
command = '"%WINPYDIR%\python.exe"'
350350
changedir = ''
351351
if workdir is not None:
352352
workdir = (workdir)
@@ -597,7 +597,7 @@ def _create_batch_scripts_initial(self):
597597
""")
598598

599599
self.create_batch_script('env_for_icons.bat', r"""@echo off
600-
call %~dp0env.bat
600+
call "%~dp0env.bat"
601601
set WINPYWORKDIR=%~dp0..\Notebooks
602602
FOR /F "delims=" %%i IN ('cscript /nologo "%~dp0WinpythonIni.vbs"') DO set winpythontoexec=%%i
603603
%winpythontoexec%set winpythontoexec=
@@ -693,7 +693,7 @@ def _create_batch_scripts(self):
693693

694694

695695
self.create_batch_script('make_cython_use_mingw.bat', r"""@echo off
696-
call %~dp0env.bat
696+
call "%~dp0env.bat"
697697
698698
rem ******************
699699
rem mingw part
@@ -719,24 +719,24 @@ def _create_batch_scripts(self):
719719
""")
720720

721721
self.create_batch_script('make_cython_use_vc.bat', r"""@echo off
722-
call %~dp0env.bat
722+
call "%~dp0env.bat"
723723
set pydistutils_cfg=%WINPYDIR%\..\settings\pydistutils.cfg
724724
echo [config]>%pydistutils_cfg%
725725
""")
726726

727727
self.create_batch_script('make_winpython_movable.bat',r"""@echo off
728-
call %~dp0env.bat
728+
call "%~dp0env.bat"
729729
echo patch pip and current launchers for move
730730
731-
%WINPYDIR%\python.exe -c "from winpython import wppm;dist=wppm.Distribution(r'%WINPYDIR%');dist.patch_standard_packages('pip', to_movable=True)"
731+
"%WINPYDIR%\python.exe" -c "from winpython import wppm;dist=wppm.Distribution(r'%WINPYDIR%');dist.patch_standard_packages('pip', to_movable=True)"
732732
pause
733733
""")
734734

735735
self.create_batch_script('make_winpython_fix.bat',r"""@echo off
736-
call %~dp0env.bat
736+
call "%~dp0env.bat"
737737
echo patch pip and current launchers for non-move
738738
739-
%WINPYDIR%\python.exe -c "from winpython import wppm;dist=wppm.Distribution(r'%WINPYDIR%');dist.patch_standard_packages('pip', to_movable=False)"
739+
"%WINPYDIR%\python.exe" -c "from winpython import wppm;dist=wppm.Distribution(r'%WINPYDIR%');dist.patch_standard_packages('pip', to_movable=False)"
740740
pause
741741
""")
742742

@@ -802,7 +802,7 @@ def _create_batch_scripts(self):
802802
self.create_batch_script('spyder_reset.bat',r"""@echo off
803803
call "%~dp0env_for_icons.bat"
804804
cd/D "%WINPYWORKDIR%"
805-
%WINPYDIR%\scripts\spyder.exe --reset %*
805+
"%WINPYDIR%\scripts\spyder.exe" --reset %*
806806
""")
807807

808808
self.create_batch_script('ipython_notebook.bat',r"""@echo off
@@ -863,24 +863,24 @@ def _create_batch_scripts(self):
863863
workdir=r'"%WINPYDIR%\Scripts"')
864864
self.create_batch_script('register_python_for_all.bat',
865865
r"""@echo off
866-
call %~dp0env.bat
867-
call %~dp0register_python.bat --all""")
866+
call "%~dp0env.bat"
867+
call "%~dp0register_python.bat" --all""")
868868

869869
self.create_batch_script('wpcp.bat',r"""@echo off
870870
call "%~dp0env_for_icons.bat"
871871
cd/D "%WINPYWORKDIR%"
872-
%WINPYDIR%\python.exe -m winpython.controlpanel %*
872+
"%WINPYDIR%\python.exe" -m winpython.controlpanel %*
873873
""")
874874

875875
#self.create_python_batch('wpcp.bat', '-m winpython.controlpanel',
876876
# workdir=r'"%WINPYDIR%\Scripts"')
877877

878878
self.create_batch_script('upgrade_pip.bat', r"""@echo off
879-
call %~dp0env.bat
879+
call "%~dp0env.bat"
880880
echo this will upgrade pip with latest version, then patch it for WinPython portability ok ?
881881
pause
882-
%WINPYDIR%\python.exe -m pip install --upgrade --force-reinstall pip
883-
%WINPYDIR%\python.exe -c "from winpython import wppm;dist=wppm.Distribution(r'%WINPYDIR%');dist.patch_standard_packages('pip', to_movable=True)
882+
"%WINPYDIR%\python.exe" -m pip install --upgrade --force-reinstall pip
883+
"%WINPYDIR%\python.exe" -c "from winpython import wppm;dist=wppm.Distribution(r'%WINPYDIR%');dist.patch_standard_packages('pip', to_movable=True)
884884
pause
885885
""")
886886

0 commit comments

Comments
 (0)