[Mesa-dev] [PATCH v2 1/5] meson: Ensure that mako is >= 0.8.0

Eric Engestrom eric.engestrom at intel.com
Thu Aug 16 09:57:45 UTC 2018


On Wednesday, 2018-08-15 09:18:04 -0700, Dylan Baker wrote:
> It's what autotools has required for a long time.
> ---
>  meson.build | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/meson.build b/meson.build
> index 7436164946b..5dc9b45eb42 100644
> --- a/meson.build
> +++ b/meson.build
> @@ -698,9 +698,9 @@ if with_platform_haiku
>  endif
>  
>  prog_python = find_program('python3')
> -has_mako = run_command(prog_python, '-c', 'import mako')
> +has_mako = run_command(prog_python, '-c', 'import mako; assert mako.__version__ >= "0.8.0"')

You should use distutils.version here too, the string comparison will
not behave the way you want; with that:
Reviewed-by: Eric Engestrom <eric.engestrom at intel.com>

>  if has_mako.returncode() != 0
> -  error('Python (3.x) mako module required to build mesa.')
> +  error('Python (3.x) mako module >= 0.8.0 required to build mesa.')
>  endif
>  
>  if cc.get_id() == 'gcc' and cc.version().version_compare('< 4.4.6')
> -- 
> 2.18.0
> 
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev


More information about the mesa-dev mailing list