, afaik setuptools ( , 20.2). , , PEP 508, , .
python : subprocess32, python2.X. :
install_requires=[
'subprocess32; python_version<"3"',
]
subx python2.7 :
Processing ./dist/subx-2017.8.0-py2-none-any.whl
Collecting subprocess32; python_version < "3" (from subx==2017.8.0)
Installing collected packages: subprocess32, subx
Successfully installed subprocess32-3.2.7 subx-2017.8.0
python3.X, :
Processing ./dist/subx-2017.8.0-py3-none-any.whl
Installing collected packages: subx
Successfully installed subx-2017.8.0
, subprocess32 .
: , auditwheel Linux delocate MacOS. :
install_requires=[
...
'auditwheel==1.7.0; "linux" in sys_platform',
'delocate==0.7.1; "darwin" == sys_platform',
]
, Linux , - python, :
$ python2 -c "import sys; print sys.platform"
linux2
$ python3 -c "import sys; print sys.platform"
linux
, , python2.X, "linux2" == sys.platform. python2.X.