[Mesa-dev] [PATCH 1/6] meson: find python2 on macOS

Dylan Baker dylan at pnwbakers.com
Thu Feb 1 18:14:31 UTC 2018


Quoting Emil Velikov (2018-02-01 03:49:12)
> On 28 January 2018 at 14:24, Jon Turney <jon.turney at dronecode.org.uk> wrote:
> > From: Dylan Baker <dylan at pnwbakers.com>
> >
> > ---
> >  meson.build | 8 +++++++-
> >  1 file changed, 7 insertions(+), 1 deletion(-)
> >
> > diff --git a/meson.build b/meson.build
> > index 824e3c46bc5..178743eddb1 100644
> > --- a/meson.build
> > +++ b/meson.build
> > @@ -642,7 +642,13 @@ if with_platform_android
> >    pre_args += '-DHAVE_ANDROID_PLATFORM'
> >  endif
> >
> > -prog_python2 = find_program('python2')
> > +# Basically we can't trust Linux because one distro had decided that python
> > +# should be python3. macOS doesn't have a python2 binary, however.
> > +if build_machine.system() != 'darwin'
> > +  prog_python2 = find_program('python2')
> > +else
> > +  prog_python2 = find_program('python')
> > +endif
> 
> I think this is better suited in meson, thus everyone doesn't need to
> reinvent the wheel.
> Even if we're moving towards python2-free world ;-)
> 
> Until then, the patch looks reasonable.
> Reviewed-by: Emil Velikov <emil.velikov at collabora.com>
> 
> -Emil

Meson does have a utility for finding python 3, and they'd take one for python 2,
but since meson itself is written in python 3 only it seems kinda silly. After
the meson stuff settles I'd like to get on with converting our python generators
to be at least hybrid if not python 3 only.

Dylan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: signature
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20180201/e07b4281/attachment.sig>


More information about the mesa-dev mailing list