On such systems like Windows and macOS, is there a way to get the path as stored on disk without resolving symbolic links? Context is that within a virtual environment the paths that sysconfig returns are in all caps for some reason:
It feels like this must be happening in get_paths, maybe environment variables are being changed in the venv? Or it thinks the OS is different for some reason…
It doesn’t happen in my env but i’m not using hatch.
On macOS with python 3.11 I cannot reproduce this problem:
% python3.11
Python 3.11.5 (v3.11.5:cce6ba91b3, Aug 24 2023, 10:50:31) [Clang 13.0.0 (clang-1300.0.29.30)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import sysconfig
>>> print(sysconfig.get_path('include'))
/Library/Frameworks/Python.framework/Versions/3.11/include/python3.11
Also I cannot reproduce on windows 11.
py -3.11
Python 3.11.6 (tags/v3.11.6:8b6ee5b, Oct 2 2023, 14:57:12) [MSC v.1935 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import sysconfig
>>> print(sysconfig.get_path('include'))
C:\Program Files\Python311\Include
>>>