install_requires based on python version
Use environment markers:
install_requires=[ 'threadpool >= 1.2.7; python_version < "3.2.0"',]
Setuptools specific usage is detailed in their documentation. The syntax shown above requires setuptools v36.2+ (change log).
This has been discussed here, it would appear the recommend way is to test for the Python version inside your setup.py
using sys.version_info
;
import sysif sys.version_info >= (3,2): install_requires = ["threadpool >= 1.2.7"]else: install_requires = ["threadpool >= 1.2.3"]setup(..., install_requires=install_requires)