comparison env/lib/python3.9/site-packages/setuptools/_distutils/command/py37compat.py @ 0:4f3585e2f14b draft default tip

"planemo upload commit 60cee0fc7c0cda8592644e1aad72851dec82c959"
author shellac
date Mon, 22 Mar 2021 18:12:50 +0000
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:4f3585e2f14b
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 if not sysconfig.get_config_var('Py_ENABLED_SHARED'):
11 return
12
13 yield 'python{}.{}{}'.format(
14 sys.hexversion >> 24,
15 (sys.hexversion >> 16) & 0xff,
16 sysconfig.get_config_var('ABIFLAGS'),
17 )
18
19
20 def compose(f1, f2):
21 return lambda *args, **kwargs: f1(f2(*args, **kwargs))
22
23
24 pythonlib = (
25 compose(list, _pythonlib_compat)
26 if sys.version_info < (3, 8)
27 and sys.platform != 'darwin'
28 and sys.platform[:3] != 'aix'
29 else list
30 )