From 190b4c34ff9fd84c78334eb5fa10e635069eb0c6 Mon Sep 17 00:00:00 2001 From: Seamus Connor Date: Wed, 14 Nov 2018 10:52:04 -0800 Subject: [PATCH] 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. --- Documentation/md2man.py | 2 +- install.do | 4 ++-- redo-always.py | 2 +- redo-ifchange.py | 2 +- redo-ifcreate.py | 2 +- redo-ood.py | 2 +- redo-sources.py | 2 +- redo-stamp.py | 2 +- redo-targets.py | 2 +- redo-unlocked.py | 2 +- redo-whichdo.py | 2 +- redo.py | 2 +- t/101-atime/tick | 2 +- t/130-mode/all.do | 2 +- t/flush-cache | 2 +- 15 files changed, 16 insertions(+), 16 deletions(-) diff --git a/Documentation/md2man.py b/Documentation/md2man.py index 1be13b1..d58a309 100755 --- a/Documentation/md2man.py +++ b/Documentation/md2man.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 import sys, os, markdown, re from BeautifulSoup import BeautifulSoup diff --git a/install.do b/install.do index ebd3f22..c5f28c6 100644 --- a/install.do +++ b/install.do @@ -26,7 +26,7 @@ for d in *.py version/*.py; do fix=$(echo $d | sed 's,-,_,g') $INSTALL -m 0644 $d $LIBDIR/$fix done -python -mcompileall $LIBDIR +python2 -mcompileall $LIBDIR # 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. @@ -37,7 +37,7 @@ for dd in redo*.py; do d=$(basename $dd .py) fix=$(echo $d | sed -e 's,-,_,g') cat >install.wrapper <<-EOF - #!/usr/bin/python + #!/usr/bin/python2 import sys, os; exedir = os.path.dirname(os.path.realpath(os.path.abspath(sys.argv[0]))) sys.path.insert(0, os.path.join(exedir, '../lib/redo')) diff --git a/redo-always.py b/redo-always.py index d8ddb9b..3f2b569 100755 --- a/redo-always.py +++ b/redo-always.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 import sys, os import vars, state from log import err diff --git a/redo-ifchange.py b/redo-ifchange.py index ee6dd83..af232be 100755 --- a/redo-ifchange.py +++ b/redo-ifchange.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 import sys, os import vars_init diff --git a/redo-ifcreate.py b/redo-ifcreate.py index b17acae..297675b 100755 --- a/redo-ifcreate.py +++ b/redo-ifcreate.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 import sys, os import vars, state from log import err diff --git a/redo-ood.py b/redo-ood.py index 250aad1..2264031 100755 --- a/redo-ood.py +++ b/redo-ood.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 import sys, os import vars_init diff --git a/redo-sources.py b/redo-sources.py index 5c54aba..6b89ece 100755 --- a/redo-sources.py +++ b/redo-sources.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 import sys, os import vars_init diff --git a/redo-stamp.py b/redo-stamp.py index 2862fe5..87989d6 100755 --- a/redo-stamp.py +++ b/redo-stamp.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 import sys, os import vars, state from log import err, debug2 diff --git a/redo-targets.py b/redo-targets.py index afb6356..ab953fb 100755 --- a/redo-targets.py +++ b/redo-targets.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 import sys, os import vars_init diff --git a/redo-unlocked.py b/redo-unlocked.py index 06759a3..bc49001 100755 --- a/redo-unlocked.py +++ b/redo-unlocked.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 import sys, os import state from log import err diff --git a/redo-whichdo.py b/redo-whichdo.py index c692e98..4495066 100755 --- a/redo-whichdo.py +++ b/redo-whichdo.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 import sys, os import vars_init diff --git a/redo.py b/redo.py index 95d46ef..3324a4b 100755 --- a/redo.py +++ b/redo.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 import sys, os import options from helpers import atoi diff --git a/t/101-atime/tick b/t/101-atime/tick index f40e325..787574a 100755 --- a/t/101-atime/tick +++ b/t/101-atime/tick @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 import time t1 = int(time.time()) diff --git a/t/130-mode/all.do b/t/130-mode/all.do index 48183fd..a53eca8 100644 --- a/t/130-mode/all.do +++ b/t/130-mode/all.do @@ -1,5 +1,5 @@ umask 0022 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 diff --git a/t/flush-cache b/t/flush-cache index 53e5af6..f96abf1 100755 --- a/t/flush-cache +++ b/t/flush-cache @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 import sys, os, sqlite3 if "DO_BUILT" in os.environ: