[Mesa-dev] [PATCH 2/5] nir: use Python to autogenerate opcode information

Dylan Baker baker.dylan.c at gmail.com
Sat Jan 17 14:41:25 PST 2015


On Saturday, January 17, 2015 01:09:45 PM Connor Abbott wrote:
> On Sat, Jan 17, 2015 at 11:42 AM, ahmad <luigide at yandex.com> wrote:
> > hi.
> >
> > "#! /usr/bin/env python" corresponds python 3.x series for some  major distro (arch,fedora ...) and python 2.x for some others.
> >
> > python 2.x and python 3.x are not source compatible each other.
> >
> > python 3.x not contains "xrange" funcion anymore.
> >
> > range vs xrange only meaningfull for python 2.x.
> >
> > http://www.pythoncentral.io/how-to-use-pythons-xrange-and-range/
> >
> > Distros that which still use 2.x  series as default python interpreter going to 3.x.
> >
> > regargs.
> > _______________________________________________
> > mesa-dev mailing list
> > mesa-dev at lists.freedesktop.org
> > http://lists.freedesktop.org/mailman/listinfo/mesa-dev
> 
> Yes... if you look at the part of the patch that modifies Makefile.am,
> it's actually called with $(PYTHON) which will be python2 on distro's
> where python3 is the default. Unfortunately, on some distros there's
> no python2, so #!/usr/bin/env python2 won't work either... you can't
> please everyone. So the line you mentioned is more customary than
> anything else.

While I agree with you Conner, when I did a survey for piglit I found
that OSX was the only major OS that didn't provide a python2 symlink,
Arch, Gentoo, Debian, Fedora, and CentOS all did, and Windows doesn't
care about a shbang.

I would actually be in favor of using /usr/bin/python2 anyway,
just because it makes it clear we're using python2, but ultimately
you're right and it doesn't really matter.

It's also been on my todo list to get all of the python in mesa working
with both python2 and python3, but I have too many things to get done.

Dylan

> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
> 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20150117/b02963a1/attachment.sig>


More information about the mesa-dev mailing list