@@ -268,7 +268,7 @@ def exec_run_cmd(args, path=None):
268268def get_r_version (path ):
269269 """Return version of the R installed in *path*"""
270270 return (
271- exec_shell_cmd ('dir ..\README.R*' , path )
271+ exec_shell_cmd (r 'dir ..\README.R*' , path )
272272 .splitlines ()[- 3 ]
273273 .split ("-" )[- 1 ]
274274 )
@@ -373,11 +373,11 @@ def patch_shebang_line(
373373 ) # Python2.7
374374 else :
375375 shebang_line = re .compile (
376- b "(#!.*pythonw?\.exe)\" ?"
376+ rb "(#!.*pythonw?\.exe)\"?"
377377 ) # Python3+
378378 if 'pypy3' in sys .executable :
379379 shebang_line = re .compile (
380- b "(#!.*pypy3w?\.exe)\" ?"
380+ rb "(#!.*pypy3w?\.exe)\"?"
381381 ) # Pypy3+
382382
383383 target_dir = target_dir .encode ('utf-8' )
@@ -420,15 +420,15 @@ def patch_shebang_line_py(
420420 # WinPython doesn't break running executable files.
421421 return
422422 if to_movable :
423- exec_path = '#!.\python.exe'
423+ exec_path = r '#!.\python.exe'
424424 if 'pypy3' in sys .executable : # PyPy !
425- exec_path = '#!.\pypy3.exe'
425+ exec_path = r '#!.\pypy3.exe'
426426 else :
427427 exec_path = '#!' + sys .executable
428428 for line in fileinput .input (fname , inplace = True ):
429- if re .match ('^#\!.*python\.exe$' , line ) is not None :
429+ if re .match (r '^#\!.*python\.exe$' , line ) is not None :
430430 print (exec_path )
431- elif re .match ('^#\!.*pypy3\.exe$' , line ) is not None :# PyPy !
431+ elif re .match (r '^#\!.*pypy3\.exe$' , line ) is not None :# PyPy !
432432 print (exec_path )
433433 else :
434434 print (line , end = '' )
0 commit comments