How can I specify library versions in setup.py?

2019-03-14 05:25发布

In my setup.py file, I've specified a few libraries needed to run my project:

setup(
    # ...
    install_requires = [
        'django-pipeline',
        'south'
    ]
)

How can I specify required versions of these libraries?

1条回答
虎瘦雄心在
2楼-- · 2019-03-14 06:15

I'm not sure about buildout, however, for setuptools/distribute, you specify version info with the comparison operators (like ==, >=, or <=).

For example:

install_requires = ['django-pipeline==1.1.22', 'south>=0.7']
查看更多
登录 后发表回答