This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author uranusjr
Recipients uranusjr
Date 2021-04-27.07:53:25
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1619510005.78.0.165065669518.issue43948@roundup.psfhosted.org>
In-reply-to
Content
When built in framework mode on macOS, distutils puts user-site headers under `{userbase}/include/python{py_version_short}{abiflags}`:

>>> import sys
>>> print(sys.platform, sys._framework)
darwin Python
>>> from distutils.dist import Distribution
>>> c = Distribution().get_command_obj('install')
>>> c.user = True
>>> c.finalize_options()
>>> print(c.install_headers)
/Users/uranusjr/Library/Python/3.9/include/python3.9/UNKNOWN

But sysconfig lacks the `pythonX.Y` part:

>>> import sysconfig
>>> print(sysconfig.get_path('include', scheme='osx_framework_user'))
/Users/uranusjr/Library/Python/3.9/include

This is inconsistent to all other schemes, such as `posix_user` (tested on the `python:3.9-slim` OCI image):

>>> import sys
>>> print(sys.platform, sys._framework)
linux
>>> from distutils.dist import Distribution
>>> c = Distribution().get_command_obj('install')
>>> c.user = True
>>> c.finalize_options()
>>> print(c.install_headers)
/root/.local/include/python3.9/UNKNOWN
>>> import sysconfig
>>> print(sysconfig.get_path('include', scheme='posix_user'))
/root/.local/include/python3.9

Note that the paths on `posix_user` only differs by one component (`UNKNOWN`, which is the distribution name), but `osx_framework_user` differs by two.
History
Date User Action Args
2021-04-27 07:53:25uranusjrsetrecipients: + uranusjr
2021-04-27 07:53:25uranusjrsetmessageid: <1619510005.78.0.165065669518.issue43948@roundup.psfhosted.org>
2021-04-27 07:53:25uranusjrlinkissue43948 messages
2021-04-27 07:53:25uranusjrcreate