4 def _pythonlib_compat():
6 On Python 3.7 and earlier, distutils would include the Python
7 library. See pypa/distutils#9.
9 from distutils import sysconfig
11 if not sysconfig.get_config_var('Py_ENABLED_SHARED'):
14 yield 'python{}.{}{}'.format(
16 (sys.hexversion >> 16) & 0xFF,
17 sysconfig.get_config_var('ABIFLAGS'),
22 return lambda *args, **kwargs: f1(f2(*args, **kwargs))
26 compose(list, _pythonlib_compat)
27 if sys.version_info < (3, 8)
28 and sys.platform != 'darwin'
29 and sys.platform[:3] != 'aix'