@@ -344,9 +344,9 @@ def create_python_batch(self, name, script_name,
344
344
345
345
if command is None :
346
346
if script_name .endswith ('.pyw' ):
347
- command = 'start %WINPYDIR%\pythonw.exe'
347
+ command = 'start " %WINPYDIR%\pythonw.exe" '
348
348
else :
349
- command = '%WINPYDIR%\python.exe'
349
+ command = '" %WINPYDIR%\python.exe" '
350
350
changedir = ''
351
351
if workdir is not None :
352
352
workdir = (workdir )
@@ -597,7 +597,7 @@ def _create_batch_scripts_initial(self):
597
597
""" )
598
598
599
599
self .create_batch_script ('env_for_icons.bat' , r"""@echo off
600
- call %~dp0env.bat
600
+ call " %~dp0env.bat"
601
601
set WINPYWORKDIR=%~dp0..\Notebooks
602
602
FOR /F "delims=" %%i IN ('cscript /nologo "%~dp0WinpythonIni.vbs"') DO set winpythontoexec=%%i
603
603
%winpythontoexec%set winpythontoexec=
@@ -693,7 +693,7 @@ def _create_batch_scripts(self):
693
693
694
694
695
695
self .create_batch_script ('make_cython_use_mingw.bat' , r"""@echo off
696
- call %~dp0env.bat
696
+ call " %~dp0env.bat"
697
697
698
698
rem ******************
699
699
rem mingw part
@@ -719,24 +719,24 @@ def _create_batch_scripts(self):
719
719
""" )
720
720
721
721
self .create_batch_script ('make_cython_use_vc.bat' , r"""@echo off
722
- call %~dp0env.bat
722
+ call " %~dp0env.bat"
723
723
set pydistutils_cfg=%WINPYDIR%\..\settings\pydistutils.cfg
724
724
echo [config]>%pydistutils_cfg%
725
725
""" )
726
726
727
727
self .create_batch_script ('make_winpython_movable.bat' ,r"""@echo off
728
- call %~dp0env.bat
728
+ call " %~dp0env.bat"
729
729
echo patch pip and current launchers for move
730
730
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)"
732
732
pause
733
733
""" )
734
734
735
735
self .create_batch_script ('make_winpython_fix.bat' ,r"""@echo off
736
- call %~dp0env.bat
736
+ call " %~dp0env.bat"
737
737
echo patch pip and current launchers for non-move
738
738
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)"
740
740
pause
741
741
""" )
742
742
@@ -802,7 +802,7 @@ def _create_batch_scripts(self):
802
802
self .create_batch_script ('spyder_reset.bat' ,r"""@echo off
803
803
call "%~dp0env_for_icons.bat"
804
804
cd/D "%WINPYWORKDIR%"
805
- %WINPYDIR%\scripts\spyder.exe --reset %*
805
+ " %WINPYDIR%\scripts\spyder.exe" --reset %*
806
806
""" )
807
807
808
808
self .create_batch_script ('ipython_notebook.bat' ,r"""@echo off
@@ -863,24 +863,24 @@ def _create_batch_scripts(self):
863
863
workdir = r'"%WINPYDIR%\Scripts"' )
864
864
self .create_batch_script ('register_python_for_all.bat' ,
865
865
r"""@echo off
866
- call %~dp0env.bat
867
- call %~dp0register_python.bat --all""" )
866
+ call " %~dp0env.bat"
867
+ call " %~dp0register_python.bat" --all""" )
868
868
869
869
self .create_batch_script ('wpcp.bat' ,r"""@echo off
870
870
call "%~dp0env_for_icons.bat"
871
871
cd/D "%WINPYWORKDIR%"
872
- %WINPYDIR%\python.exe -m winpython.controlpanel %*
872
+ " %WINPYDIR%\python.exe" -m winpython.controlpanel %*
873
873
""" )
874
874
875
875
#self.create_python_batch('wpcp.bat', '-m winpython.controlpanel',
876
876
# workdir=r'"%WINPYDIR%\Scripts"')
877
877
878
878
self .create_batch_script ('upgrade_pip.bat' , r"""@echo off
879
- call %~dp0env.bat
879
+ call " %~dp0env.bat"
880
880
echo this will upgrade pip with latest version, then patch it for WinPython portability ok ?
881
881
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)
884
884
pause
885
885
""" )
886
886
0 commit comments