gpt4 book ai didi

python - 如何向 Buildout 添加依赖项?

转载 作者:太空宇宙 更新时间:2023-11-03 13:51:48 27 4
gpt4 key购买 nike

我是 Buildout 的新手,但多亏了很棒的教程,我才刚刚在其中构建了我的第一个 Django 应用程序 here .我习惯使用 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(或最新版本)的依赖项?

最佳答案

将所需依赖项的名称添加到 setup.pyinstall_requires 数组中:

setup(
...
install_requires = ['setuptools', 'south'],
...
)

关于python - 如何向 Buildout 添加依赖项?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6893758/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com