Re: Replace uses of deprecated Python module distutils.sysconfig

Andres Freund <andres@anarazel.de>

From: Andres Freund <andres@anarazel.de>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Peter Eisentraut <peter.eisentraut@enterprisedb.com>, Andrew Dunstan <andrew@dunslane.net>, pgsql-hackers@lists.postgresql.org
Date: 2022-01-23T23:19:11Z
Lists: pgsql-hackers
Hi,

On 2022-01-23 18:11:41 -0500, Tom Lane wrote:
> It may be that one of the other "scheme" values accurately describes
> Debian's actual layout of this package.  I didn't check, because the
> scheme is defined to be platform-specific.

posix_prefix does, as far as I can see.


> Specifying a particular value for it would therefore break other platforms.

Hence the suggestion to only force posix_prefix when posix_local (the debian
invention) otherwise would get used...


> Anyway, trying to figure out whether we're on a Debian package with this
> mistake doesn't seem any cleaner than what I proposed.  (In particular,
> blindly changing to a different scheme without a check to see what's really
> in the filesystem seems doomed to failure.)

If we make it depend on _get_default_scheme() == 'posix_local' that shouldn't
be a risk, because that's the debian addition...

Greetings,

Andres Freund



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