Re: Replace uses of deprecated Python module distutils.sysconfig

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: Peter Eisentraut <peter.eisentraut@enterprisedb.com>
Cc: Andrew Dunstan <andrew@dunslane.net>, pgsql-hackers@lists.postgresql.org
Date: 2022-01-19T16:21:15Z
Lists: pgsql-hackers

Attachments

I wrote:
> Anyway, based on these results, we might have better luck switching to
> sysconfig after we start forcing python3.

On the other hand, that answer is not back-patchable, and we surely
need a back-patchable fix, because people will try to build the
back branches against newer pythons.

Based on the buildfarm results so far, the problem can be described
as "some installations say /usr/local when they should have said /usr".
I experimented with the attached delta patch and it fixes the problem
on my Debian 9 image.  (I don't know Python, so there may be a better
way to do this.)  We'd have to also bump the minimum 3.x version to
3.2, but that seems very unlikely to bother anyone.

			regards, tom lane

Commits

  1. Replace use of deprecated Python module distutils.sysconfig, take 2.

  2. Temporarily add some information about python include paths to configure.

  3. Revert "Make configure prefer python3 to plain python."

  4. Make configure prefer python3 to plain python.

  5. Replace use of deprecated Python module distutils.sysconfig