Subject: Re: Replace uses of deprecated Python module distutils.sysconfig

From: Peter Eisentraut <[email-masked]>
Date: Tue, 18 Jan 2022 11:20:31 +0100

On 09.12.21 14:31, Tom Lane wrote:
> Peter Eisentraut <[email-masked]> writes:
>> On 02.12.21 08:20, Peter Eisentraut wrote:
>>> Buildfarm impact:
>>> gaur and prariedog use Python 2.6 and would need to be upgraded.
> 
>> Tom, are you planning to update the Python version on these build farm
>> members?  I realize these are very slow machines and this might take
>> some time; I'm just wondering if this had registered.
> 
> I can do that when it becomes necessary.  I've got one eye on the meson
> conversion discussion, which will kill those two animals altogether;
> so it seems possible that updating their Pythons now would just be
> wasted effort depending on what lands first.

I saw that the Python installations on gaur and prairiedog had been 
updated, so I committed this patch.  As the buildfarm shows, various 
platforms have problems with this, in particular because they point to 
the wrong place for the include directory.  AFAICT, in most cases this 
appears to have been fixed in more recent editions of those platforms 
(e.g., Debian unstable members pass but older releases don't), so at 
least the approach was apparently not wrong in principle.  But 
obviously, this leaves us in a mess.  I will revert this patch in a bit, 
after gathering a few more hours of data.

Also, considering the failure on prairiedog, I do see now on 
<https://docs.python.org/3/library/sysconfig.html> that the sysconfig 
module is "New in version 3.2".  I had interpreted the fact that it 
exists in version 2.7 that that includes all higher versions, but 
obviously there were multiple branches involved, so that was a mistaken 
assumption.