Renato Golin via llvm-dev
2016-Feb-24 20:48 UTC
[llvm-dev] Can lit be upgraded to assume Python 2.7?
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. cheers, --renato
Justin Bogner via llvm-dev
2016-Feb-24 20:58 UTC
[llvm-dev] Can lit be upgraded to assume Python 2.7?
Renato Golin via llvm-dev <llvm-dev at lists.llvm.org> writes:> 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.This is dangerous. I believe it's still the case that many systems don't provide a "python2", but only python, python2.6, python2.7, etc.
Brian Cain via llvm-dev
2016-Feb-25 02:11 UTC
[llvm-dev] Can lit be upgraded to assume Python 2.7?
On Feb 24, 2016 2:59 PM, "Justin Bogner via llvm-dev" < llvm-dev at lists.llvm.org> wrote:> > Renato Golin via llvm-dev <llvm-dev at lists.llvm.org> writes: > > 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. > > This is dangerous. I believe it's still the case that many systems don't > provide a "python2", but only python, python2.6, python2.7, etc. >It's possible to implement such that it executes as expected in python3 or python 2. Is anyone already working on that? If not, I'd be willing to see what it takes. If successful, it would probably be appropriate to put just "env python" in the shebang. Note that straddling 2 and 3 is significant ly easier if you can safely assume 2.7. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160224/d495f982/attachment.html>
Duncan P. N. Exon Smith via llvm-dev
2016-Feb-25 03:08 UTC
[llvm-dev] Can lit be upgraded to assume Python 2.7?
> 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.
Gregory Szorc via llvm-dev
2016-Feb-28 20:37 UTC
[llvm-dev] Can lit be upgraded to assume Python 2.7?
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>