Replaced all instances of 'python' with 'python2'

On systems where 'python' refers to python3, redo
failed to launch. All invocations of python have been
made explicitly python2 invocations. All tests pass
on an Arch Linux system as of this commit.
This commit is contained in:
Seamus Connor 2018-11-14 10:52:04 -08:00
commit 190b4c34ff
15 changed files with 16 additions and 16 deletions

View file

@ -1,4 +1,4 @@
#!/usr/bin/env python #!/usr/bin/env python2
import sys, os, markdown, re import sys, os, markdown, re
from BeautifulSoup import BeautifulSoup from BeautifulSoup import BeautifulSoup

View file

@ -26,7 +26,7 @@ for d in *.py version/*.py; do
fix=$(echo $d | sed 's,-,_,g') fix=$(echo $d | sed 's,-,_,g')
$INSTALL -m 0644 $d $LIBDIR/$fix $INSTALL -m 0644 $d $LIBDIR/$fix
done done
python -mcompileall $LIBDIR python2 -mcompileall $LIBDIR
# It's important for the file to actually be named 'sh'. Some shells (like # It's important for the file to actually be named 'sh'. Some shells (like
# bash and zsh) only go into POSIX-compatible mode if they have that name. # bash and zsh) only go into POSIX-compatible mode if they have that name.
@ -37,7 +37,7 @@ for dd in redo*.py; do
d=$(basename $dd .py) d=$(basename $dd .py)
fix=$(echo $d | sed -e 's,-,_,g') fix=$(echo $d | sed -e 's,-,_,g')
cat >install.wrapper <<-EOF cat >install.wrapper <<-EOF
#!/usr/bin/python #!/usr/bin/python2
import sys, os; import sys, os;
exedir = os.path.dirname(os.path.realpath(os.path.abspath(sys.argv[0]))) exedir = os.path.dirname(os.path.realpath(os.path.abspath(sys.argv[0])))
sys.path.insert(0, os.path.join(exedir, '../lib/redo')) sys.path.insert(0, os.path.join(exedir, '../lib/redo'))

View file

@ -1,4 +1,4 @@
#!/usr/bin/env python #!/usr/bin/env python2
import sys, os import sys, os
import vars, state import vars, state
from log import err from log import err

View file

@ -1,4 +1,4 @@
#!/usr/bin/env python #!/usr/bin/env python2
import sys, os import sys, os
import vars_init import vars_init

View file

@ -1,4 +1,4 @@
#!/usr/bin/env python #!/usr/bin/env python2
import sys, os import sys, os
import vars, state import vars, state
from log import err from log import err

View file

@ -1,4 +1,4 @@
#!/usr/bin/env python #!/usr/bin/env python2
import sys, os import sys, os
import vars_init import vars_init

View file

@ -1,4 +1,4 @@
#!/usr/bin/env python #!/usr/bin/env python2
import sys, os import sys, os
import vars_init import vars_init

View file

@ -1,4 +1,4 @@
#!/usr/bin/env python #!/usr/bin/env python2
import sys, os import sys, os
import vars, state import vars, state
from log import err, debug2 from log import err, debug2

View file

@ -1,4 +1,4 @@
#!/usr/bin/env python #!/usr/bin/env python2
import sys, os import sys, os
import vars_init import vars_init

View file

@ -1,4 +1,4 @@
#!/usr/bin/env python #!/usr/bin/env python2
import sys, os import sys, os
import state import state
from log import err from log import err

View file

@ -1,4 +1,4 @@
#!/usr/bin/env python #!/usr/bin/env python2
import sys, os import sys, os
import vars_init import vars_init

View file

@ -1,4 +1,4 @@
#!/usr/bin/env python #!/usr/bin/env python2
import sys, os import sys, os
import options import options
from helpers import atoi from helpers import atoi

View file

@ -1,4 +1,4 @@
#!/usr/bin/env python #!/usr/bin/env python2
import time import time
t1 = int(time.time()) t1 = int(time.time())

View file

@ -1,5 +1,5 @@
umask 0022 umask 0022
redo mode1 redo mode1
MODE=$(python -c 'import os; print oct(os.stat("mode1").st_mode & 07777)') MODE=$(python2 -c 'import os; print oct(os.stat("mode1").st_mode & 07777)')
[ "$MODE" = "0644" ] || exit 78 [ "$MODE" = "0644" ] || exit 78

View file

@ -1,4 +1,4 @@
#!/usr/bin/env python #!/usr/bin/env python2
import sys, os, sqlite3 import sys, os, sqlite3
if "DO_BUILT" in os.environ: if "DO_BUILT" in os.environ: