Re: Error on missing Python module in Meson setup

From: Daniel Gustafsson <daniel(at)yesql(dot)se>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: PostgreSQL Developers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Error on missing Python module in Meson setup
Date: 2022-11-15 12:41:15
Message-ID: A14FCAE1-8B2E-407C-9C9E-54EC344825B0@yesql.se
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> On 15 Nov 2022, at 01:25, Andres Freund <andres(at)anarazel(dot)de> wrote:
> On 2022-11-14 14:23:02 +0100, Daniel Gustafsson wrote

>> Installing the distutils package fixes it, but it seems harsh to fail setup on
>> a missing package. Would something like the attached make sense?
>
> The error is a bit better in newer versions of meson:
> meson.build:986: WARNING: <PythonExternalProgram 'python3' -> ['/usr/bin/python3']> is not a valid python or it is missing distutils
> but we do still error out weirdly afterwards.
>
> We probably should report this to the meson folks regardless of us working
> around it or not.

Thats better, but I wish meson could be more specific since it at that point
should know if Python works at all or is missing distutils.

> Perhaps worth simplifying a bit. What do you think about:
>
> ...

Agreed, that's a better version. The attached version with a disabler object
is even more to the point, and seems to works on my box both with and without
distutils and libpython. Is this the correct way to use disablers?

--
Daniel Gustafsson https://vmware.com/

Attachment Content-Type Size
meson_python-v2.diff application/octet-stream 887 bytes

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrew Dunstan 2022-11-15 13:04:29 Re: meson oddities
Previous Message houzj.fnst@fujitsu.com 2022-11-15 11:57:38 RE: Perform streaming logical transactions by background workers and parallel apply