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: Andres Freund <andres@anarazel.de>, Andrew Dunstan <andrew@dunslane.net>,
pgsql-hackers@lists.postgresql.org
Date: 2022-01-24T21:05:05Z
Lists: pgsql-hackers
Peter Eisentraut <peter.eisentraut@enterprisedb.com> writes:
> Also note that python-config is itself a Python script that uses
> sysconfig and includes code like this:
> elif opt in ('--includes', '--cflags'):
> flags = ['-I' + sysconfig.get_path('include'),
> '-I' + sysconfig.get_path('platinclude')]
> So this would just do the same thing we are already doing anyway.
It used to look like that, but at least in my 3.6.8 installation
on RHEL8, it's been rewritten to be a shell script that doesn't
depend on sysconfig at all.
The result is sufficiently bletcherous that you'd have thought
they'd reconsider getting rid of sysconfig :-(. Also, it
definitely won't work on Windows.
regards, tom lane
Commits
-
Replace use of deprecated Python module distutils.sysconfig, take 2.
- e41176bd6f47 11.15 landed
- aa2215d6b8ac 12.10 landed
- a72c430120cf 10.20 landed
- 803f0b173906 14.2 landed
- 4d7d196ff693 13.6 landed
- bd233bdd8dd9 15.0 landed
-
Temporarily add some information about python include paths to configure.
- f032f63e727c 15.0 landed
-
Revert "Make configure prefer python3 to plain python."
- 512fc2dd790e 15.0 landed
-
Make configure prefer python3 to plain python.
- f201da39edcd 15.0 landed
-
Replace use of deprecated Python module distutils.sysconfig
- e0e567a10672 15.0 landed