@@ -268,7 +268,7 @@ def exec_run_cmd(args, path=None):
268
268
def get_r_version (path ):
269
269
"""Return version of the R installed in *path*"""
270
270
return (
271
- exec_shell_cmd ('dir ..\README.R*' , path )
271
+ exec_shell_cmd (r 'dir ..\README.R*' , path )
272
272
.splitlines ()[- 3 ]
273
273
.split ("-" )[- 1 ]
274
274
)
@@ -373,11 +373,11 @@ def patch_shebang_line(
373
373
) # Python2.7
374
374
else :
375
375
shebang_line = re .compile (
376
- b "(#!.*pythonw?\.exe)\" ?"
376
+ rb "(#!.*pythonw?\.exe)\"?"
377
377
) # Python3+
378
378
if 'pypy3' in sys .executable :
379
379
shebang_line = re .compile (
380
- b "(#!.*pypy3w?\.exe)\" ?"
380
+ rb "(#!.*pypy3w?\.exe)\"?"
381
381
) # Pypy3+
382
382
383
383
target_dir = target_dir .encode ('utf-8' )
@@ -420,15 +420,15 @@ def patch_shebang_line_py(
420
420
# WinPython doesn't break running executable files.
421
421
return
422
422
if to_movable :
423
- exec_path = '#!.\python.exe'
423
+ exec_path = r '#!.\python.exe'
424
424
if 'pypy3' in sys .executable : # PyPy !
425
- exec_path = '#!.\pypy3.exe'
425
+ exec_path = r '#!.\pypy3.exe'
426
426
else :
427
427
exec_path = '#!' + sys .executable
428
428
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 :
430
430
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 !
432
432
print (exec_path )
433
433
else :
434
434
print (line , end = '' )
0 commit comments