New submission from Tzu-ping Chung <[email protected]>:
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.
----------
components: Library (Lib)
messages: 392037
nosy: uranusjr
priority: normal
severity: normal
status: open
title: sysconfig’s osx_framework_user puts headers in different locations from
distutils
versions: Python 3.10, Python 3.11, Python 3.6, Python 3.7, Python 3.8, Python
3.9
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue43948>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com