setup.py: restrict the allowable version of the python interpreter

As of version 9.0.1 pip will honor a new python_requires string, specifying the Python version required for installation, e.g, for example if one wishes to enforce minimum Python version of 3.3:

setup(
    ...,
    python_requires=">=3.3"
)

See here for more details. See also this answer on SO.

Leave a Comment