#2058: Simfactory assumes python is python2 -------------------------+-------------------------------------------------- Reporter: sbrandt | Owner: Type: defect | Status: new Priority: unset | Milestone: Component: SimFactory | Version: development version Resolution: | Keywords: newuser -------------------------+--------------------------------------------------
Comment (by sbrandt):
Based on conversations and emails, I think this is what we want.
{{{ diff --git a/bin/sim b/bin/sim index 92f74ab..c6bc075 100755 --- a/bin/sim +++ b/bin/sim @@ -20,4 +20,18 @@ if [ -z "$cmd" ]; then fi
# Forward the call -exec python "$cmd" "$@" +for PYEXE in python python2 +do + $PYEXE - > /dev/null 2>&1 << EOF +import sys +if sys.hexversion < 0x3000000: + exit(0) +else: + exit(1) +EOF + if [ $? = 0 ] + then + exec $PYEXE "$cmd" "$@" + break + fi +done }}}