from verlib import NormalizedVersion as V
assert V('0.7.9') < V('0.8a0') < V('0.8a1') < V('0.8b0') < V('0.8b1') < V(
    '0.8b2') < V('0.8.0') < V('0.8.1a0') < V('0.8.1') < V('0.9') < V('1.0a3'
    ) < V('1.0b2') < V('1.0b20') < V('1.0c0') < V('1.0') < V('1.0.1')
assert V('0.7.9') < V('0.8.0a0') < V('0.8.0a1') < V('0.8.0b0') < V('0.8.0b1'
    ) < V('0.8.0b2') < V('0.8.0') < V('0.8.1a0') < V('0.8.1') < V('0.9') < V(
    '1.0a3') < V('1.0b2') < V('1.0b20') < V('1.0c0') < V('1.0') < V('1.0.1')
How to specify version ranges in install_requires (setuptools, distribute)