我该如何在Buildout中添加依赖?
我刚接触Buildout,刚刚按照一个很不错的教程成功让我的第一个Django应用在它里面构建起来了,教程可以在这里找到。我之前用的是Maven,所以我想知道怎么“添加一个依赖”,让Buildout下载它并把它包含在构建中?这是我的buildout.cfg
文件:
[buildout]
parts = python django
develop = .
eggs = my-project
versions = versions
[versions]
django = 1.3
[python]
recipe = zc.recipe.egg
interpreter = python
eggs = ${buildout:eggs}
[django]
recipe = djangorecipe
project = my-project
projectegg = my-project
settings = settings
test = my-project
eggs = ${buildout:eggs}
我需要在这里做什么改动,才能添加一个依赖,使用south
,版本是0.7.3(或者最新的版本)?
1 个回答
6
在 setup.py
文件的 install_requires
数组中添加你需要的依赖项名称:
setup(
...
install_requires = ['setuptools', 'south'],
...
)