python (3.11.7)

(root)/
lib/
python3.11/
site-packages/
setuptools/
_distutils/
command/
py37compat.py
       1  import sys
       2  
       3  
       4  def _pythonlib_compat():
       5      """
       6      On Python 3.7 and earlier, distutils would include the Python
       7      library. See pypa/distutils#9.
       8      """
       9      from distutils import sysconfig
      10  
      11      if not sysconfig.get_config_var('Py_ENABLED_SHARED'):
      12          return
      13  
      14      yield 'python{}.{}{}'.format(
      15          sys.hexversion >> 24,
      16          (sys.hexversion >> 16) & 0xFF,
      17          sysconfig.get_config_var('ABIFLAGS'),
      18      )
      19  
      20  
      21  def compose(f1, f2):
      22      return lambda *args, **kwargs: f1(f2(*args, **kwargs))
      23  
      24  
      25  pythonlib = (
      26      compose(list, _pythonlib_compat)
      27      if sys.version_info < (3, 8)
      28      and sys.platform != 'darwin'
      29      and sys.platform[:3] != 'aix'
      30      else list
      31  )