Re: Error on missing Python module in Meson setup - Mailing list pgsql-hackers

From Daniel Gustafsson
Subject Re: Error on missing Python module in Meson setup
Date
Msg-id A14FCAE1-8B2E-407C-9C9E-54EC344825B0@yesql.se
Whole thread Raw
In response to Re: Error on missing Python module in Meson setup  (Andres Freund <andres@anarazel.de>)
List pgsql-hackers
> On 15 Nov 2022, at 01:25, Andres Freund <andres@anarazel.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
missingdistutils 
> 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

pgsql-hackers by date:

Previous
From: "houzj.fnst@fujitsu.com"
Date:
Subject: RE: Perform streaming logical transactions by background workers and parallel apply
Next
From: Andrew Dunstan
Date:
Subject: Re: meson oddities