[llvm-dev] Can lit be upgraded to assume Python 2.7?

Gregory Szorc via llvm-dev llvm-dev at lists.llvm.org
Sun Feb 28 12:37:59 PST 2016


On Wed, Feb 24, 2016 at 7:08 PM, Duncan P. N. Exon Smith via llvm-dev <
llvm-dev at lists.llvm.org> wrote:

>
> > On 2016-Feb-24, at 12:48, Renato Golin via llvm-dev <
> llvm-dev at lists.llvm.org> wrote:
> >
> > On 24 February 2016 at 19:49, Sean Silva via llvm-dev
> > <llvm-dev at lists.llvm.org> wrote:
> >> Great! I'll circle around to this at some point. Despite the "obvious"
> >> nature of it I still am wary of underestimating the cruftiness of the
> >> buildbots, so I'll probably do it some time at night when the bots are
> >> mostly green so that I can easily see if any bots *are* broken by this.
> >
> > While at it, can you call "env python2" in the shebang line? It makes
> > it a lot easier for Python3 systems, like Arch.
>
> I don't think darwin installs anything with the name python2.
>

It is possible to create a script that is both valid shell and Python that
will e.g. invoke `which` to find the appropriate python binary and execute
it. See https://hg.mozilla.org/mozilla-central/file/5e0140b6d118/mach for
an example. With a little tweaking, you could have it search for multiple
pythonX.Y binaries and pick the most appropriate one.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160228/fce4ca5e/attachment.html>


More information about the llvm-dev mailing list