Re: Replace uses of deprecated Python module distutils.sysconfig

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Replace uses of deprecated Python module distutils.sysconfig
Дата
Msg-id 1769679.1642979501@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Replace uses of deprecated Python module distutils.sysconfig  (Peter Eisentraut <peter.eisentraut@enterprisedb.com>)
Список pgsql-hackers
Andres Freund <andres@anarazel.de> writes:
> On 2022-01-23 16:06:21 -0500, Tom Lane wrote:
>> +    'posix_local': {
>> +        'stdlib': '{base}/lib/python{py_version_short}',
>> +        'platstdlib': '{platbase}/lib/python{py_version_short}',
>> +        'purelib': '{base}/local/lib/python{py_version_short}/dist-packages',
>> +        'platlib': '{platbase}/local/lib/python{py_version_short}/dist-packages',
>> +        'include': '{base}/local/include/python{py_version_short}',
>> +        'platinclude': '{platbase}/local/include/python{py_version_short}',
>> +        'scripts': '{base}/local/bin',
>> +        'data': '{base}/local',
>> +        },
>> +    'deb_system': {
>> +        'stdlib': '{base}/lib/python{py_version_short}',
>> +        'platstdlib': '{platbase}/lib/python{py_version_short}',
>> +        'purelib': '{base}/lib/python{py_version_short}/dist-packages',
>> +        'platlib': '{platbase}/lib/python{py_version_short}/dist-packages',
>> +        'include': '{base}/include/python{py_version_short}',
>> +        'platinclude': '{platbase}/include/python{py_version_short}',
>> +        'scripts': '{base}/bin',
>> +        'data': '{base}',
>> +        },
>> 'posix_home': {

> Hm. It seems the intent of the different paths you show is that we can specify
> which type of path we want. The one to locally installed extensions, or the
> distribution ones. So we'd have to specify the scheme to get the other include
> path?

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.  Specifying a particular
value for it would therefore break other platforms.  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.)

            regards, tom lane



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Andrew Dunstan
Дата:
Сообщение: Re: fairywren is generating bogus BASE_BACKUP commands
Следующее
От: Corey Huinker
Дата:
Сообщение: Re: WIP: System Versioned Temporal Table